The Padres rallied from a five-run deficit, trying the game with a pair of solo home runs in the ninth inning, before Chris Young hit a walk-off homer in the bottom of the inning for a 6-5 victory by the D-backs in front of a sold-out crowd of 48,946.
The home run by Young off reliever Luke Gregerson -- oddly enough, Young started the first inning with a home run -- quickly took the wind out of the sails of the Padres (63-46), who furiously rallied over the final four innings to tie the game.
"I love the way we battled back," Padres manager Bud Black said.
Trailing, 5-3, the Padres inched closer in the ninth inning when Jerry Hairston Jr. launched a solo home run to left field off reliever Aaron Heilman. Heilman recovered to get the next two hitters out before he left a pitch over the plate to Adrian Gonzalez, who hit a ball the other way for a game-tying home run, his 22nd of the season.
The Padres' players and coached lined along the top step of the visiting dugout erupted.
The celebration, however, didn't last long.
Young jumped on a 1-2 slider by Gregerson, his bread-and-butter pitch, sending it over the fence in left field, ending the Padres' hopes of adding to their lead in the National League West.
"I know myself as a hitter to the point I was pretty sure he was probably going to throw the slider," Young said. "He threw it down one time, and I went after it. He happened to leave one up, and that's the one you really want to hit."
Young became the fourth player in the past 40 years to lead off the first and end a game with a home run.
The Padres, now 2-4 on this seven-game road trip, maintain a one-game lead over the Giants in the West, not that any of that seemed important following the game.
The Padres were in a hole early, as starting pitcher Clayton Richard allowed Young's first homer. That wouldn't be the end of Richard's troubles, though.
The first four hitters reached base against Richard in the fourth inning, including Adam LaRoche, who had an RBI single, and Rusty Ryal, who added a run-scoring double that made it 3-0.
"They got on a little bit of a roll and took advantage of anything over the plate, and they squared it up," Richard said.
Later in the inning, with first base open, the Padres elected to issue Stephen Drew an intentional walk. But Richard's last throw to catcher Nick Hundley sailed over his head, allowing a run to score to make it 4-0.
"I failed to execute a pitch," said Richard, who has a 5.93 ERA in five starts since the All-Star break compared to a 3.33 ERA before.
A John Hester RBI made it 5-0 and ended Richard's outing at 3 2/3 innings, his shortest start of the season.
"In the fourth, it started bad with the walk [to Kelly Johnson]," Black said. "He left some pitches out over the plate, and they didn't miss them."
Trailing, 5-0, the Padres started their comeback against pitcher Rodrigo Lopez by scoring three runs in the sixth inning.
Miguel Tejada, Gonzalez, Ludwick and Chase Headley started the inning with hits, with an RBI double by Ludwick -- his first RBI with his new team since being acquired from the Cardinals -- and Headley's hit accounted for runs. Hundley's sacrifice fly cut the score to 5-3.
The Padres loaded the bases in the seventh inning with Ludwick up. After he fell behind in the count, 0-2, he worked the count to 2-2 before driving a ball deep into the gap in right-center field.
"He hit it solid, and hit it to the biggest part of the park," Black said. "It's over 400 feet out there."
But there was Young again, this time making a difference with his glove and his legs, tracking the ball down on the run for the final out of the inning.
"I hit the ball well, but he had a good bead on it," Ludwick said. "We had an opportunity ... that's a positive."