By JANIE McCAULEY
AP Baseball Writer
SAN FRANCISCO — Hanley Ramirez hit a go-ahead RBI double in the top of the ninth inning and the Los Angeles Dodgers trimmed a game off their division deficit with a 3-2 win against the NL West-leading San Francisco Giants on Saturday.
Adrian Gonzalez led off the ninth with a triple against Jeremy Affeldt (1-2), then Ramirez came through with a double to the gap in right-center. That was the Dodgers’ first hit in 15 tries so far this series with runners in scoring position.
Ronald Belisario (5-1) pitched out of trouble in the eighth for the victory, helping Los Angeles snap a four-game losing streak to rival San Francisco in a key September weekend.
Buster Posey hit an RBI single in the first and Brandon Belt added a go-ahead RBI with a groundout in the eighth for the Giants, who lead the Dodgers by 4½ games.
The Dodgers were without center fielder Matt Kemp because of his troublesome left shoulder. He was scheduled for a contrasting MRI exam and also won’t play today. Infielder Adam Kennedy is expected to be done for the season after injuring his groin during Friday’s 5-2 loss. Manager Don Mattingly said Kennedy was hurt when the third baseman tried to bare hand Hunter Pence’s infield bouncer for an RBI single in the sixth inning.
Los Angeles pulled through with players down as it has many times in 2012.
Pinch-runner Alex Castellanos scored the tying run on a wild pitch in the top of the eighth to chase Giants starter Matt Cain. Juan Rivera doubled to start the inning and A.J. Ellis sacrificed him to third, where Castellanos entered. Bobby Abreu came in to pinch-hit and Cain threw wildly on full-count for ball four as Abreu drew a walk.
Santiago Casilla, Friday night’s winning pitcher, relieved and escaped further damage but the Giants’ bullpen couldn’t pull off a second consecutive win.
Brandon League pitched the ninth for Los Angeles to earn his 11th save overall and second since joining the Dodgers from Seattle on July 30. He allowed Gregor Blanco’s two-out double before retiring pinch-hitter Hector Sanchez on a liner to third.
Cain, who tossed a perfect game June 13 at home against the Astros, worked into the eighth inning but wound up with a third straight no-decision. He allowed two runs and six hits in 7 1-3 innings, struck out five and walked two.
Cain shut down the middle of the Dodgers lineup most of the way just as Tim Lincecum did a night earlier. That included Gonzalez, who came in with four career homers against Cain. Gonzalez’s triple was his first hit of the day after he grounded into an inning-ending double play in the first and a pair of flyouts.
Cain threw two wild pitches in a game for just the second time after also doing so Aug. 29, 2010, against Arizona.
Chris Capuano gave up two runs and five hits in seven innings but saw his winless stretch reach five starts since a victory at Miami on Aug. 12. He is 0-2 and has only one victory over his past nine outings.
The lefty is 1-6 in 12 career outings and eight starts against the Giants, including a loss Aug. 22 at Dodger Stadium.
After Posey’s hit, he retired 12 straight before Blanco beat out an infield single that manager Don Mattingly argued with first-base umpire Brian O’Nora. Replays showed Capuano’s foot hitting the bag before Blanco made it. But he was later out in a close play at third that drew San Francisco skipper Bruce Bochy out of the dugout for words with umpire Alfonso Marquez.
Capuano singled in the sixth and became just the second Dodgers player to get beyond first when he advanced on Mark Ellis’ single. The pitcher scored the tying run on Shane Victorino’s sacrifice fly.
NATIONALS 7, MARLINS 6 (10)
WASHINGTON — Pinch-hitter Corey Brown singled to drive in Ian Desmond with Washington’s winning run in the bottom of the 10th.
After Adam LaRoche singled off Chad Guadin (3-2) to open the inning, Desmond singled him to third and Danny Espinosa was intentionally walked to load the bases. After a forceout at home, Brown blooped a single to right.
Drew Storen (2-1) pitched a scoreless 10th inning for the win.
After a 2:33 rain delay, Jayson Werth led off the bottom of the ninth with home run off Heath Bell to tie it at 6-all.
Ryan Zimmerman’s 20th homer of the season, a two-run shot with no outs in the eighth, cut Miami’s lead to 6-5.
Miami starter Mark Buehrle allowed three runs and five hits in seven innings and struck out five.
Nationals starter Ross Detwiler gave up five runs, three earned, in five innings.