PHOENIX -- The San Diego Padres were down by six runs with two innings to play. Their manager had been tossed. So had their starting catcher.
Those old road woes seemed to be back.
"It's not unlike the first couple of weeks of the season," manager Bud Black said. "We came back from 7-1 in Philadelphia ... We've done it before. It's something we as coaches always remember, to remind our guys that we can do it. If you do it once, you can do it again."
San Diego, which snapped an 11-game road losing streak, trailed 7-1 before scoring five in the eighth, one in the ninth and two in the 10th.
"It's been a lot of fun to come to the ballpark these last 10 days," Headley said. "We come here and we expect to win. It's not that we come in here and hope to win, we expect to win. We just couldn't give up today."
Black and Padres catcher Nick Hundley weren't around to watch the impressive finish. They were thrown out by home plate umpire Eric Cooper in the bottom of the sixth.
It was a painful loss for an Arizona team just back from a 6-3 road trip.
"We just didn't find a way to finish the game," manager A.J. Hinch said. "Offensively and defensively we just got caught in a couple of lapses that could have made the game a little bit easier at the end and didn't, and they took advantage of it."
"It's just the best feeling in the world," Headley said. "You go up there and you get a big hit in a big situation and it ends up being the game winner. There's nothing better than that."
Drew Macias had the big blow of the rally, a three-run double to slice the lead to 7-6.
San Diego relievers have allowed one run in the last 33 games.
Arizona's Chad Qualls blew a save for the second time in 13 opportunities, giving up a leadoff double to pinch hitter Brian Giles, who advanced to third on David Eckstein's ground out and scored on Scott Hairston's single to tie it at 7-7.
The Padres' Adrian Gonzalez hit his 17th homer, a leadoff shot in the fourth.
A grounder through the legs of Arizona shortstop Stephen Drew opened the way for the San Diego rally.
After started Doug Davis left with the bases loaded and one out, reliever Jon Rauch gave up RBI singles to Kevin Kouzmanoff and Henry Blanco. Lefty Clay Zavada, who had yet to give up a hit in two appearances since being called up from Double-A Mobile, got Headley to pop out, but Macias doubled to the right-center gap to make it a one-run game.
"He threw a slider and it didn't really slide," Macias said.
Hundley and Black were tossed after Cooper ruled that the catcher had come off of home plate after receiving a throw from the first baseman Gonzalez for what would have been a force out with the bases loaded. Hundley then threw to first for what the Padres believed was a double play to end the inning.
"We were thinking home-to-first double play," Black said. "From what I saw, that's what I thought we got. But Eric thought Nick had slid off the plate before he caught the ball. Nick disagreed with him, and so did I."
The run that crossed the plate on the play made it 7-1.
After the game, Black watched a television replay of him being tossed as Sen. John McCain grinned broadly in the background.
"I've never been thrown out in front of a presidential candidate," Black exclaimed. "I love it."
- Before the game, McCain's son Jack stood with his mother Cindy on the mound during a moment silence for U.S. service personnel who have died in battle. Sen. McCain watched from a front-row seat near the Diamondbacks dugout.
- Arizona 2B Felipe Lopez sat out his second straight game because hamstring tightness.