Pirates 7, Diamondbacks 6:
Neil Walker homered and matched a career high with five RBIs to lead Pittsburgh past visiting Arizona.
Rookies Starling Marte and Jordy Mercer also hit home runs for the Pirates, who have won 22 of their last 27 home games.
Kevin Correia (9-6) allowed four runs - three earned - over six innings for the win, while Joel Hanrahan struck out the side in a perfect ninth for his 33rd save.
The Diamondbacks staked Ian Kennedy (10-9) to a 2-0 lead in the first on Chris Johnson's RBI single and Paul Goldschmidt's sacrifice fly but Kennedy couldn't hold the lead. Walker's three-run blast in the bottom of the inning made it 3-2.
Walker chased Kennedy and gave the Pirates a 6-4 lead with a two-run double into the gap in left-center in the fifth. Mercer extended the lead with his first major-league homer, a shot to left leading off the sixth against Josh Collmenter.
The Pirates made three errors in the seventh inning - and four in all - but Arizona managed only one run in the frame, leaving the bases loaded when Chris Young struck out looking to end the inning.
Young subsequently was ejected for arguing with home plate umpire Larry Vanover, and second base umpire Brian O'Nora threw out Arizona outfielder Justin Upton moments later. Kennedy was tagged for six runs - five earned - on eight hits over four innings. He walked three and struck out five.
GAME NOTEBOOK: Nine of Walker's 13 home runs have come since July 2. … Marte has homered in consecutive games for the first time in his career. … Mercer's home run came in his 26th career at-bat. … Johnson has at least one RBI in seven of his nine games since Arizona acquired him from Houston. … The Pirates improved to 54-1 when leading after seven innings.