PHOENIX — Double-digit strikeouts in a game is nothing new for Max Scherzer. Hitting a two-run single is much more rare.

Scherzer was strong on the mound with 11 strikeouts in eight innings, but his sixth-inning base hit with two outs and the bases loaded helped lead the Washington Nationals to a 8-3 win over the Arizona Diamondbacks on Wednesday.

Scherzer (12-6) and his manager, Dusty Baker, said the Nationals work on their hitting almost daily.

"I really take pride in being able to move runners and help the team," Scherzer said. "Any time you can do something at the plate to help your team, it really puts a smile on everybody's face."

Washington earned its fourth road series sweep of the season and first since May 30-June 1 at Philadelphia. Arizona lost its fourth straight and sixth in seven games, and fell to 0-9 in Wednesday games at home this season.

Scherzer allowed three runs on four hits, giving up two homers, and walked one. He is 3-0 in four starts against his former team, which drafted the four-time All-Star and former Cy Young Award winner No. 11 overall in 2006.

"He gave us quality. He only made two mistakes," Baker said.

Daniel Murphy's sixth-inning solo home run broke a 1-1 tie before Scherzer bounced a single up the middle with the bases loaded and two outs, driving in Anthony Rendon and Danny Espinosa. Scherzer battled back from an 0-2 count.

"I didn't make a pitch. I threw a cutter that just ran in like a fastball and he put a good swing on it and got it back up the middle and got a hit," Diamondbacks starter Zack Godley said of Scherzer's single. "Tip your hat to him. He put a good at-bat together, I just didn't make my pitch."

Murphy, the NL's leading hitter with a .358 average, has hit safely in 17 of 19 games and has seven home runs in that span, 20 on the season.

"Fortunately we were able to get some good pitches to hit that third time through the lineup and put some good swings on him (Godley)," Murphy said.

Scherzer held the Diamondbacks hitless for four innings, but David Peralta led off the bottom of the fifth with a double to left field. Peralta advanced to third on a wild pitch, and with one out, scored when Bryce Harper dropped a sliding catch of Brandon Drury's shallow fly ball to right.

That tied the game at 1, after Trea Turner's second career home run and first of 2016 came with one out in the top of the third.

The Nationals went ahead 4-1 in the sixth before Jake Lamb's solo shot in the bottom of the inning. It was Lamb's second homer in as many days.

Yasmany Tomas cut the Nationals' lead to one with a home run in the seventh, the first time in his career he's gone deep in back-to-back games.

The Nationals scored four runs in the ninth off Arizona's troubled bullpen, on Espinosa's RBI ground-rule double, a walk and Clint Robinson's two-run pinch-hit single.

Godley (3-2) allowed four runs and eight hits with seven strikeouts and a walk in six innings.

"I was happy with our offensive performance against him (Scherzer)," Arizona manager Chip Hale said. "He's one of the better guys in the league and one of the best competitors. The game was very well played for the eight innings, and then we just couldn't hold them in the top of the ninth."

TRAINER'S ROOM

Nationals: Harper returned to the lineup after missing Tuesday's game because of illness. ... INF Ryan Zimmerman remained out with a wrist injury; he hasn't played since July 31 at San Francisco.

UP NEXT

Nationals: The club had yet to name a starting pitcher for Friday at home against San Francisco after Thursday's day off.

Diamondbacks: RHP Braden Shipley (1-1) is set for his third major league start Friday against Milwaukee, after making his major league debut July 25 against the Brewers on the road. He's coming off six scoreless innings at Los Angeles on July 30.