The Padres (80-61) snapped a virtual tie for the top spot in the division, taking a one-game lead over the Giants (80-63) after dropping the first two in the four-game set. San Francisco pulled within one percentage point of San Diego with Friday night’s 1-0 win.

Stauffer, the club’s long reliever, made just his third start of the season but was sensational. He yielded three hits and pitched out of his only jam in the second.

Torrealba’s fifth homer in the third landed in the right-field porch and helped San Diego win for just the fourth time in 16 games.

Braves 6  Cardinals 3, 12 innings: In Atlanta, Alex Gonzalez hit a three-run homer in the 12th inning and the Braves moved into a tie for the NL East lead.

With runners on first and third and the outfielders playing shallow to guard against a sacrifice fly, Gonzalez hit the winning shot off Mitchell Boggs (2-3) into the left-field seats.

The Braves improved their major league-best home record to 51-20 and grabbed a share of the division lead with the Philadelphia Phillies, who lost to the New York Mets 4-3.

Mets 4  Phillies 3: In New York, Mike Pelfrey was dominant into the eighth inning to earn his career-high 14th victory, and the Mets stopped the Phillies’ four-game winning streak.

Ike Davis kept up his big September with four hits and three RBIs and Jose Reyes homered for the Mets, helping quiet the red-clad Philadelphia fans in the Citi Field crowd of 35,788.

New York was able to slow the surging Phillies in their pursuit of a fourth straight NL East title even without center fielder Carlos Beltran, who sat out with tendinitis in his left knee. He is day to day.

Marlins 4, Nationals 1: In Washington, Florida’s Anibal Sanchez remained unbeaten against Washington, allowing four hits in 7 2-3 innings to beat the Nationals for the fifth straight time.

Emilio Bonifacio hit a two-run single to back Sanchez (12-9), who gave up one run, struck out four and walked none. He has a 2.29 career ERA against the Nationals, going 2-0 this year. Wilson Ramos’ RBI double in the eighth was the first earned run Sanchez allowed against the Nationals in 23 1-3 innings.

Dodgers 6  Astros 3: In Houston, reliever Brandon Lyon’s threw away a bunt for a tiebreaking two-run error in a three-run ninth inning, giving the Dodgers a win over the Astros.

Dodgers manager Joe Torre was ejected in the first inning by plate umpire Paul Emmel. Torre complained from the dugout after Casey Blake was called out on strikes, then left the dugout following the ejection to speak with Emmel.

With the score 3-3, Trent Oeltjen singled off Lyon (6-6) and Reed Johnson reached on a bunt single down the first-base line.

A.J. Ellis bunted, and Lyon picked up the sacrifice, then hesitated and threw wildly to first as two runs scored. Ellis went to third on the error and scored on pinch-hitter James Loney’s double.

Reds 5, Pirates 4  10 innings: In Cincinnati, Joey Votto led off the bottom of the 10th with his 33rd homer, sending the Reds to a wild victory over the Pirates that extended their NL Central lead to a daunting seven games.

Votto hit the fourth pitch from Justin Thomas (0-1) into the seats in left, touching off chants of “MVP” with his first career game-ending homer.

Edinson Volquez dominated for seven innings, allowing one hit and fanning 10 before turning a 3-0 lead over to the Reds bullpen.

Cubs 1  Brewers 0: In Milwaukee, Ryan Dempster struck out eight in seven crisp innings, earning his 100th career win and helping the Cubs beat the Brewers.

Xavier Nady homered for Chicago, which got an outstanding outing from Carlos Zambrano in a 4-0 victory in the series opener Friday night.

Dempster (13-10) allowed three hits and walked two, improving to 15-2 with a 2.90 ERA in 22 career starts against the Brewers. The right-hander retired 21 of the first 26 batters on his way to his 50th victory with Chicago.

Rockies 2  Diamondbacks 1: In Denver, pinch-hitter Jonathan Herrera’s sacrifice fly off Mike Hampton broke a seventh-inning tie and the Rockies rallied past the Diamondbacks for their ninth straight victory.

Rookie Matt Reynolds (1-0) picked up his first major league win by working one scoreless inning and the Rockies stayed 2 1/2 games behind San Diego in the NL West race. The Padres beat San Francisco 1-0.

Diamondbacks right-hander Rodrigo Lopez cruised along until the seventh, when he gave up three straight hits, including Miguel Olivo’s RBI single that tied it at 1 and took Ubaldo Jimenez off the hook for a hard-luck loss.