SAN FRANCISCO -- Manny Ramirez is embracing his role as a run scorer.
The 12-time All-Star hit three doubles, twice leading off innings, and scoring each time to give Los Angeles the lead. Andre Ethier doubled him in with the go-ahead run in the ninth inning and the Dodgers beat the San Francisco Giants 5-3 on Tuesday night, avoiding their longest losing streak of the season.
"I'm a doubles maniac," Ramirez said. "I set the table now. I'm just trying to get a good pitch to hit. When it comes September, we want to know where we're at. For now we'll go battle everybody hard and ... win."
Ethier said he feels a little more responsibility with Ramirez hitting ahead of him.
"You better get used to it, the manager is penciling you in there," Ethier said. "He's up there getting his pitches and we have to do our job to assure that he keeps getting pitches. When he sets the table like that it's a lot of fun."
Will Ohman pitched a perfect ninth to get a save in his first opportunity with the Dodgers.
"This was a nice one to lock down," Ohman said. "My job was to come in and get three outs and I did and that's all it was."
Ramirez opened the ninth against Bob Howry (0-2) with his third double. Ethier followed one out later with his double and Matt Kemp tripled home Ethier.
"I was thinking why not get this thing done," Ethier said. "Most of all, I reminded myself don't swing at anything out of the zone, don't get yourself out. Get a good pitch in the zone. I was able to battle and hit one of his mistakes when he made them."
Dodgers starter Chad Billingsley pitched 7 1/3 innings, allowing three runs and seven hits, striking out eight.
"I made bad pitches and he's too good of a hitter to miss them," Howry said of Ramirez. "I threw an 0-2 slider off the plate and tried to come back with a splitfinger and hung it over the middle of the plate."
Giants starter Jonathan Sanchez gave up two runs, both unearned, and three hits.
The Dodgers took a 1-0 lead in the second on Loney's RBI single.
The Giants scored twice in the third and the Dodgers tied the game in the fourth courtesy of a throwing error by shortstop Juan Uribe.
"It was a strange game, that's for sure," Dodgers manager Joe Torre said.
Dodgers RHP Jason Schmidt threw 89 pitches in an extended spring game before leaving after getting hit in the left leg with a line drive. ... Giants OF Andres Torres was placed on the 15-day DL with a strained left hamstring. IF Eugenio Velez was recalled from Fresno a day after being optioned. ... Dodgers RHP Cory Wade was scheduled for a one-inning rehab at Single-A Inland Empire and is expected to join the team for Thursday's game against San Diego. ... The announced attendance of 30,482 was the lowest attended Giants-Dodgers game in San Francisco since 23,081 showed up at Candlestick Park on Aug. 7, 1995. ... Ramirez walked twice and reached base all five plate appearances to improve his on-base percentage to .494.