Matt Cain didn't allow a hit into the eighth inning, pitching the San Francisco Giants past the fading Colorado Rockies 4-2 on Sunday and back into first place in the National League West. San Francisco moved a half-game ahead of San Diego, which lost to Cincinnati. The Rockies, who have dropped six of seven, fell 4 1/2 games behind the Giants and four back of the Padres in the wild-card race. Cain (13-10) held the Rockies hitless until speedy Jay Payton legged out an infield single with one out in the eighth. Pinch-hitter Melvin Mora connected for a two-run homer, ending Cain's scoreless streak at 20 innings. Still, the right-hander went the distance on a three-hitter for his 12th career complete game and fourth this season. He won his fourth straight start and hasn't lost in seven outings since Aug. 18. Freddy Sanchez homered off Jorge De La Rosa (8-6), and Cody Ross also went deep for the Giants. Reds 12, Padres 2 At San Diego, Chris Heisey homered and hit a three-run double to lead Cincinnati to a romp over San Diego that reduced its magic number to one for winning the NL Central. Joey Votto and Brandon Phillips also homered for the Reds, denied a chance to clinch the division title Sunday when St. Louis beat the Chicago Cubs. Cincinnati is off Monday and then opens a three-game series at home Tuesday night against Houston. San Diego's loss ensured a playoff spot for the Philadelphia Phillies, who need one win or an Atlanta defeat to wrap up the NL East crown. Adrian Gonzalez hit his 30th homer for the Padres and finished with three hits. Clayton Richard (13-9) allowed six runs and five hits in five-plus innings. Mets 7, Phillies 3 At Philadelphia, Carlos Beltran hit a pair of homers and David Wright also connected as New York prevented Philadelphia from clinching their fourth straight NL East title at home. The two-time defending NL champions came in needing a win and a loss by Atlanta to secure the division crown. The Braves lost to Washington, dropping Philadelphia's magic number to one. Chase Utley hit a three-run homer for the Phillies, who will finish the season on the road with three games at Washington and three at Atlanta. Nationals 4, Braves 2 At Washington, Atlanta's drive for the NL wild card spun its wheels again, with wild pitchers and missed opportunities at the plate contributing to a loss to last-place Washington. Every Nationals player who scored got on base with a walk, the last two runs coming on Ian Desmond's tiebreaking single in the seventh that followed three straight free passes from the Braves bullpen. The Nationals took two of three from the Braves in the series. Atlanta has lost five of six. Cardinals 8, Cubs 7 At Chicago, Albert Pujols hit his league-leading 42nd home run as St. Louis held off Chicago to prevent the Reds from clinching the NL Central title. Pujols hit a three-run homer and Matt Pagnozzi drove in three runs as the Cardinals took an 8-0 lead in the fifth. The Cubs finished 35-46 at Wrigley Field this season. Jake Westbrook (3-4) pitched 5 1-3 innings and allowed three earned runs. Ryan Franklin got five outs for his 26th save in 28 opportunities. Pirates 9, Astros 3 At Pittsburgh, Paul Maholm limited Houston to one run over seven innings to win consecutive starts for the first time all season as Pittsburgh turned catcher Jason Castro's throwing error into its first two runs. Maholm (9-15) avoided adding to his NL-leading loss total, permitting Carlos Lee's two-out RBI double in the first before shutting out the Astros over the next six innings. Neil Walker drove in three runs as the Pirates scored three times in the seventh and four in the eighth against Houston's bullpen. Hunter Pence hit his 25th homer for the Astros. Brewers 7, Marlins 1 At Milwaukee, Ryan Braun hit two of Milwaukee's four home runs and Chris Capuano pitched six sharp innings before leaving with an injury in Milwaukee's victory over Florida. Capuano (4-4) limited the Marlins to one run and four hits. He came out to start the seventh, but left the mound after a couple of warmup tosses because of a strained left groin. Braun hit a pair of two-run homers and Prince Fielder and Lorenzo Cain also connected for Milwaukee. Braun homered off Adalberto Mendez (1-2) in the first and third, reaching 25 homers and becoming the third Brewers player with 100 RBIs in three straight seasons. Fielder followed Braun's second shot with his 32nd home run. Diamondbacks 5, Dodgers 4 At Phoenix, Chris Young and Tony Abreu each hit a two-run homer in a four-run eighth inning to rally Arizona past Los Angeles. The comeback spoiled a 13-strikeout effort from Dodgers starter Chad Billingsley, who tied a career high. George Sherrill allowed Abreu's homer, his first of the season, to cut the lead to one. Two batters later, Young hammered the first pitch from Jonathan Broxton (5-6) to put the Diamondbacks ahead in their final home game of the season. James Loney hit a two-run double and Rod Barajas had a two-run homer for Los Angeles. 