Joaquin Arias and pinch-hitter Roger Kieschnick had RBI singles off Jonathan Papelbon in the top of the ninth inning, then Sergio Romo escaped a bases-loaded jam in the bottom half as the San Francisco Giants beat the Philadelphia Phillies 2-1 Thursday night.
Matt Cain (7-6) gave up one run and six hits in eight innings. The struggling ace lowered his ERA to 4.57.
Cole Hamels allowed seven hits and struck out five in eight scoreless innings. The 2008 World Series MVP hasn't pitched like a three-time All-Star this season, but he left with a 1-0 lead that he gave himself with an RBI single.
Then Papelbon (2-1) blew it — a familiar scene for the 2012 All-Star closer. He started the season 13 for 13 in save opportunities, but is 7 for 13 since. He heard loud boos throughout the inning and when he walked to the dugout.
Hunter Pence led off the ninth with an infield single and advanced to third on Brett Pill's single to right. Kieschnick followed with a tying single that sent Pill to third, and Arias grounded his go-ahead hit to left.
Romo loaded the bases with no outs before finishing for his 25th save in 29 tries.
Pinch-hitter Delmon Young reached on third baseman Pablo Sandoval's error to start the bottom of the ninth. Cody Asche then tried to sacrifice, but Romo fielded it and slipped so the rookie got credit for his major league hit. John Mayberry Jr. was hit by a pitch while trying to sacrifice to load the bases.
After Laynce Nix flied to shallow right, Carlos Ruiz flied to shallow left. Pinch-hitter Erik Kratz grounded out to third to end it.
The defending World Series champion Giants took two of three, but remain last in the NL West.
The Phillies are 2-10 since the All-Star break and have dropped to 9½ games behind Cincinnati for the second wild-card spot in the NL.
Cain retired the first 11 batters, striking out five, before Chase Utley lined a single in the fourth.
Nix hit a broken-bat single with two outs in the fifth and Ruiz followed with a single. Hamels then sliced an RBI single down the left-field line for a 1-0 lead.
The Phillies missed a chance to add runs in the seventh and eighth. Michael Martinez was thrown out by left fielder Jeff Francoeur trying to score from second on Mayberry's single in the seventh.
After Jimmy Rollins tripled in the eighth, he was thrown out trying to score on Michael Young's grounder to shortstop.
Last July, the Phillies gave Hamels a six-year, $144 million extension to pass up free agency. But they're just 6-17 in his starts.
NOTES: Sandoval was in the lineup for the Giants after leaving Wednesday night's game with a right heel bruise. ... Former Phillies closer Brad Lidge threw out the first pitch. Lidge, who was 48 for 48 in save chances during Philadelphia's 2008 World Series championship season, formally retired as a member of the Phillies. ... Madison Bumgarner (10-6) starts for the Giants at Tampa Bay on Friday night. ... Former ace Curt Schilling will be inducted into the Phillies' Wall of Fame on Friday. ... RHP Ethan Martin will make his major league debut for the Phillies on Friday night against Atlanta's Kris Medlen (7-10). Martin, acquired from the Los Angeles Dodgers in a trade for Shane Victorino last year, is 11-5 with a 4.12 ERA in 21 starts at Triple-A Lehigh Valley. Cliff Lee, who missed his start because of a stiff neck, will pitch Sunday.