Updated

ATLANTA (AP) — The San Diego Padres stole the Atlanta Braves' final at-bat glory. Along the way, the Padres also took the Braves' hold on the National League's best record.

Atlanta reliever Billy Wagner blew a two-run lead in the ninth inning, and pinch-hitter Nick Hundley's two-run double in the 12th lifted the Padres to a 6-4 victory over the Braves on Wednesday night in a matchup of division leaders.

The Braves lead the major leagues with 16 final at-bat victories, one more than Cincinnati and two more than San Diego.

The Padres (55-38) moved past the Braves (55-39) for the best record in the National League. The two first-place teams have split the first two games of a three-game series.

Chris Denorfia led off the 12th with a single off Kris Medlen (6-2), Atlanta's seventh pitcher. Denorfia stole second base as Tony Gwynn Jr. struck out for the second out. An intentional walk to Oscar Salazar put runners on first and second for Hundley, who pinch-hit for Tim Stauffer (3-1).

Hundley's double down the left-field line made it 6-4.

"I got a pretty good pitch to hit," Hundley said. "He threw it up in the zone a little high, and I was able to get the wood on it."

Hundley said the ninth-inning rally against Wagner provided momentum for the win.

"That was huge, to get two in the ninth against one of the best teams in the league," Hundley said. "That was really impressive. And against Billy Wagner; you're not going to see that very often."

Heath Bell earned his 27th save with three strikeouts in the bottom of the 12th. The game lasted 4 hours, 13 minutes.

Six San Diego relievers combined for seven scoreless innings.

"You have to give credit to all the guys in the bullpen," Padres manager Bud Black said. "They did their job."

It was the fourth blown save for Wagner, who couldn't hold a 4-2 lead in the ninth. The Padres rallied with Scott Hairston's pinch-hit homer, a single by Jerry Hairston and Yorvit Torrealba's tying double to right.

"I don't think you can ever brush those games off," Wagner said. "It's tough to swallow when you know you had this game and it slips away."

Stauffer pitched two scoreless innings to lower his ERA to 0.33.

The Braves led 4-2 after Brian McCann's two-run homer capped a four-run third inning. The homer followed Chipper Jones' two-run single as the Braves took the lead with four straight two-out hits.

Wagner's blown save cost Tommy Hanson a win. Hanson gave up six hits and two runs in 6 1-3 innings. He walked two and struck out five.

San Diego's Jon Garland allowed six hits and four runs in five innings.

Hanson hit Will Venable and Jerry Hairston with pitches in the second and fourth innings, respectively. Hanson leads the major leagues with 13 hit batters.

Garland untucked Troy Glaus' shirt by hitting the first baseman with a pitch above the belt in the fifth.

Venable stole second base after his second-inning single. He scored on Everth Cabrera's single. Hairston added a run-scoring single for a 2-0 lead.

San Diego's Adrian Gonzalez was 0 for 6 with four strikeouts.

Two outfielders — Venable and Atlanta's Nate McLouth — started after coming off the disabled list. McLouth missed 33 games with a head injury. Venable missed 13 games with a lower back strain.

Manager Bobby Cox said Medlen, who threw 24 pitches, will still return to the rotation as planned and will start on Saturday at Florida.

NOTES: Padres 2B David Eckstein was placed on the 15-day DL with a right calf strain. He left Tuesday night's game with the injury. ... Jones returned after missing three starts with a mild left hamstring strain. ... The Braves optioned OF Gregor Blanco to Triple-A Gwinnett to clear a spot for McLouth. ... Atlanta's Jason Heyward had two hits, giving him five in the first two games of the series and a five-game hitting streak as he gains momentum following his return from a thumb injury. The rookie stole second base in the seventh.