PHILADELPHIA — Gregor Blanco drove in the tiebreaking run with a drag bunt single in the 10th and San Francisco beat Philadelphia 6-5 on Saturday in a game where All-Star pitchers Cole Hamels and Matt Cain hit homers in the same inning.
Jonathan Papelbon (2-4) walked Melky Cabrera to start the 10th. He advanced to third on a single and scored with out on Blanco's perfect bunt down the first-base line.
Cabrera hit a tying homer off Hamels in the eighth and Buster Posey hit a two-run shot for the NL West-leading Giants, who are 7-1 since the All-Star break.
Ryan Howard hit a three-run homer and Chase Utley also went deep for the last-place Phillies, who have lost three in a row, seven straight at home.
Hamels allowed five runs and 10 hits, including three homers, in 72/3 innings on a career-high 128 pitches.
Cain gave up five runs and five hits, including three homers, in eight innings.
Sergio Romo (3-1) retired the two batters he faced in the ninth and Santiago Casilla finished for his 24th save.
Diamondbacks 12, Astros 3
At Phoenix, Jason Kubel became the seventh player in Diamondbacks' history to homer three times in a game and he drove in six runs as Arizona dominated Houston for the second straight game.
Kubel hit a two-run home run in the first inning and a three-run shot in the fourth off starter Dallas Keuchel (1-2). He added a solo homer in the sixth. He struck out in his other two at-bats.
Braves 4-2, National 0-5
At Washington, Bryce Harper returned from an ankle injury to single and score as a pinch-hitter, and Roger Bernadina had a tiebreaking hit in the seventh inning as Washington earned a split of the day-night doubleheader.
Harper injured his ankle in the opener and was lifted after the second inning. The Braves won the first game behind Ben Sheets' strong pitching performance.
Dodgers 8, Mets 5
At New York, Juan Uribe broke out of a long slump with a homer and four RBIs for Los Angeles and Chris Capuano pitched seven solid innings against his former team.
Uribe hit an early two-run double to end a 1-for-38 slide. He added a two-run homer in the ninth inning off 13-game winner R.A. Dickey, who was making his first relief appearance of the season to help an overtaxed Mets bullpen.
Reds 6, Brewers 2
At Cincinnati, Ryan Ludwick and Brandon Phillips hit two-run homers to lead Cincinnati.
The NL Central leaders have gone 4-2 since slugger Joey Votto learned he needed surgery for torn knee cartilage. The Reds have won 10 of 12 overall, moving a season-high 14 games over .500.
Cardinals 12, Cubs 0
At St. Louis, Jake Westbrook allowed three hits over seven innings and St. Louis backed him by tying a 76-year-old major league record with seven doubles.
Rafael Furcal's go-ahead single in the seventh turned out to be a mere appetizer as the Cardinals also matched an 86-year-old franchise record for runs in an inning.
Pirates 5, Marlins 1
At Pittsburgh, A.J. Burnett remained undefeated at home by pitching 72/3 strong innings and Pittsburgh matched a season high with its fourth consecutive win.
Burnett (11-3) allowed one run and eight hits. A homer by Justin Ruggiano was his only blemish as he improved to 7-0 at home this season and Pittsburgh (53-40) moved 13 games over .500 for the first time since the end of the 1992 season.
Rockies 8, Padres 6, 12 innings
At San Diego, Jordan Pacheco drove in four runs, including the go-ahead score in the 12th inning, and Michael Cuddyer tied a career high with four hits for Colorado.
The victory snapped the Padres' four-game winning streak and ended the Rockies' three-game skid.
Athletics 2, Yankees 1
At Oakland, Calif., Brandon Inge and Yoenis Cespedes homered, Jarrod Parker shut down one of baseball's best lineups for eight innings and the Athletics beat the Yankees for their fourth straight win.
Parker (7-4) allowed only an RBI single to Raul Ibanez in the fourth to become the latest Oakland starter to baffle the Bronx Bombers. He struck out five and walked one to hand New York its third straight loss in the series.
Cespedes crushed a tying homer later in the fourth and Inge hammered the first pitch of the eighth off Phil Hughes (9-8) for the go-ahead shot.
Mariners 2, Rays 1
At St. Petersburg, Fla., Jason Vargas took a shutout into the seventh inning, Michael Saunders had two RBIs and Seattle beat Tampa Bay.
Vargas (10-7) gave up one run and seven hits in six-plus innings as the Mariners stopped a nine-game losing streak against the Rays.
Tigers 7, White Sox 1
At Detroit, Rick Porcello pitched brilliantly into the ninth inning, and the Detroit Tigers took over first place in the AL Central.
Rangers 9, Angels 2
At Anaheim, Calif., Mike Napoli homered twice against his former team, Yu Darvish struck out 11 over seven strong innings, and Texas battered struggling Angels starter Ervin Santana in a victory over Los Angeles.
Napoli, Yorvit Torrealba and Adrian Beltre homered during Texas' five-run second inning, chasing Santana (4-10) after just 13 batters.
Blue Jays 7, Red Sox 3
At Boston, Edwin Encarnacion tied the game with a two-run homer in the sixth, then J.P. Arencibia gave Toronto the lead with a seventh-inning solo shot and the Blue Jays beat the Red Sox.
Royals 7, Twins 3
At Kansas City, Mo., Lorenzo Cain drove in three runs and Alex Gordon had three hits and scored two runs as the Royals beat the Twins.
Cain delivered run-producing singles in the first and fifth innings and he had an RBI double in the seventh. Cain's three RBIs matched a career high.
Orioles 3, Indians 1
At Cleveland, Jim Thome's two-run homer in the seventh inning led Baltimore to its fourth straight victory.
Thome, who passed Sammy Sosa for seventh place on the career list Friday, hit his 611th and second with Baltimore since being acquired from Philadelphia on July 1 off Zach McAllister (4-2).