Padres 6, Diamondbacks 5: Chase Headley led off the eighth inning with his second home run of the night as host San Diego extended its winning streak against Arizona to seven games.
Headley finished with four RBIs and Yasmani Grandal added a two-run double for the Padres, who have won 13 of 17 overall and 17 of 22 at home.
After Miguel Montero hit a two-run double in the top of the eighth to forge a 5-5 tie, Headley deposited a 3-1 offering from David Hernandez (2-3) over the wall in center field leading off the bottom of the inning for his 26th blast.
It capped the fourth two-homer performance of the season for Headley, who staked San Diego to 5-0 lead with a three-run shot in the third.
Ryan Wheeler collected two hits and three RBIs for the Diamondbacks, who remained 6 1/2 games behind St. Louis for the second wild-card spot in the National League.
Brad Brach (2-4) struck out the only batter he faced in the eighth and Luke Gregerson allowed a two-out hit in the ninth before notching his fifth save.
Trailing 5-0, Arizona battled back as Wheeler hit a two-run double in the fifth and plated a run in the seventh with another two-base hit.
Montero also scored a pair of runs for the Diamondbacks, who are 4-4 on their 10-game road trip.
GAME NOTEBOOK: Headley has recorded at least one RBI in six straight games and has driven in 17 runs over his last eight contests. ... San Diego OF Carlos Quentin was scratched from the lineup due to irritation in his right knee. ... Arizona CF Chris Young delivered a two-out single as a pinch hitter in the ninth inning. Young remains limited to pinch-hitting duty because of a strained left quadriceps. ... Padres RHP Anthony Bass allowed an unearned run over 1 2/3 innings in his first appearance since June 20. Bass had been sidelined with inflammation in his right shoulder.