PHILADELPHIA — 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.