The Nationals put together a five-run fifth inning against All-Star Wade Miley to pick up their season-high eighth straight win against the Arizona Diamondbacks, 6-5.

Ryan Zimmerman picked up a pair of hits and drove in two runs for Washington, which won the first two games of its three-game set against Arizona.

Edwin Jackson (7-7) recovered from a tough start to pick up the win. Jackson was chased after 5 2/3 innings in which he allowed five runs on eight hits and three walks. He stuck out six.

"Definitely the runs we scored backed up a bad outing by me," Jackson said. "I guess it was just good enough to keep us close."

The Nationals tagged Miley (12-8) for six runs -- four earned -- on nine hits and walk in 4 1/3 innings.

"It's very frustrating," Miley said. "Especially you go out and the team gets you four runs early, this ones on me. I just wasn't able to keep the lead. I wasn't executing pitches, staying middle. It just got ugly, like a merry-go- round out there, I couldn't put an end to it."

Aaron Hill hit a home run as the Diamondbacks lost for the sixth time in their last eight games.

Washington, which came into the fifth trailing 4-1, roared back. But its booming comeback started quietly, as Steve Lombardozzi dropped down a bunt single to start the frame. Two batters later, Jayson Werth scolded a double to left field to plate Lombardozzi.

Washington then received help from Arizona third baseman Chris Johnson, who booted Danny Espinosa's grounder and allowed runners to reach second and third. Zimmerman took advantage of the miscue when he stroked a two-strike fastball into left field to tie the game at four.

Miley's wild pitch and catcher Miguel Montero's throwing error put Zimmerman on third before he scored when Michael Morse lined a double to center field. Miley was pulled after issuing a walk to Adam LaRoche, but Brad Bergesen did not have much success, either. He later surrendered an RBI single to Jesus Flores to put the Nats up 6-4.

Arizona picked up a run in the sixth inning when pinch-hitter Ryan Wheeler doubled home Gerardo Parra on his bobblehead night, but the Diamondbacks were unable to pull any closer.

Mike Gonzalez worked around a pair of walks in the eighth and Tyler Clippard tossed a perfect ninth to nail down his 24th save and preserve the victory.

The two teams traded runs in the first inning. Zimmerman sliced a double down the right-field line which Justin Upton misplayed, allowing Espinosa to score in the top of the frame. Hill slammed a fastball over the left-field fence to tie the game.

The Diamondbacks pulled ahead in the second after Upton's chopper eluded Zimmerman's glove and put him on second. Montero lined a triple to the left- field gap to score Upton, then came home on Stephen Drew's base hit.

Arizona picked up a fourth run when Upton smoked a double to put runners on second and third in the third. Johnson lofted a sacrifice fly to score Jason Kubel and put the Diamondbacks up 4-1.

Game Notes

The Diamondbacks have scored five or more runs 58 times this season, most in the National League...Washington is 22-9 since the All-Star break...The Nationals own the best road record in baseball at 39-21 and have won 18 of their past 23 games away from home...Washington is 12-4 in one-run games...The Nationals last lost a series in Arizona in 2008...Prior to the game, Arizona designated pitcher Mike Zagurski for assignment, placed infielder Willie Bloomquist on the 15-day disabled list, retroactive to August 9 with a strained back, and recalled infielder Jake Elmore and pitcher Bryan Shaw. Shaw pitched a perfect seventh, striking out the side and Elmore flew out in a pinch-hit at-bat...Washington improved to a season-best 28 games above .500.