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.
San Francisco took two of three in a key series at Coors Field.
Freddy Sanchez homered off Jorge De La Rosa (8-6), and Cody Ross also went deep for the Giants.
Reds 12 Padres 2: In San Diego, Chris Heisey homered and hit a three-run double, leading the Cincinnati Reds to a romp over San Diego that reduced their 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.
The Padres fell out of first place in the NL West but have a half-game lead over the Braves in the wild-card race.
Mets 7 Phillies 3: In Philadelphia, Carlos Beltran hit a pair of homers, David Wright also connected and New York beat Philadelphia, preventing the Phillies 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.
The Mets roughed up Cole Hamels (12-11) again. Hamels allowed five runs and nine hits in four-plus innings, falling to 0-4 against New York this year. The lefty had been dominant recently. He gave up just four runs in his previous six starts, a span of 43 2-3 innings.
Nationals 4 Braves 2: In 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.
The Braves, who lost the season series 10-8 to the Nationals, now head home to finish up with a six-game stand against Florida and Philadelphia.
Cardinals 8 Cubs 7: In Chicago, Albert Pujols hit his league-leading 42nd home run and St. Louis held off Chicago, preventing 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.
Jeff Smardzija (2-2) was tagged for eight runs and seven hits in 4 1-3 innings.
Pirates 9 Astros 3: In Pittsburgh, Paul Maholm limited Houston to one run over seven innings to win consecutive starts for the first time all season, and 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.
J.A. Happ (6-3) lost despite limiting Pittsburgh to four singles over six innings.
Brewers 7 Marlins 1: In 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.
Diamondbacks 5 Dodgers 4: In 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.
