NEW YORK(AP) Oliver Perez was back at it, walking one batter after another. This time, however, he managed to wriggle out of trouble.
Perez won despite a wild return from the disabled list and the depleted New York Mets finally mustered some offense Wednesday night, overcoming Manny Ramirez 's homer in a 5-4 victory over the Los Angeles Dodgers .
David Wright snapped an 0-for-17 slump with his first RBI this month. Daniel Murphy doubled twice and made an incredible play at first base, and the Mets ended a four-game skid with their third victory in 12 games.
''It was a big win for us,'' manager Jerry Manuel said. ''We needed to win a game.''
Ramirez hit a leadoff shot to right in the ninth inning off Francisco Rodriguez , making it 5-4. The All-Star closer walked his next batter, but got Andre Ethier to ground into a game-ending double play with two on for his 22nd save in 25 chances.
Ramirez's 535th homer broke a tie with Hall of Famer Jimmie Foxx for 16th place on the career list, one behind Mickey Mantle .
Booed consistently by the crowd of 40,027, Ramirez went 1 for 5 in his fifth game back following a 50-game drug suspension. He played all nine innings for the first time since his return - the enigmatic slugger was ejected for throwing equipment following a fifth-inning strikeout Tuesday night.
Ramirez said umpire John Hirschbeck told him Wednesday that he missed the call in question the previous night.
''We're friends. Everybody makes mistakes. I overreacted,'' Ramirez said.
Ramirez, who stranded two runners with a sixth-inning groundout against Bobby Parnell , is 4 for 16 (.250) with two home runs and five RBIs since returning to the lineup.
''I've still got a long way to go,'' Ramirez said, explaining that he needs to build strength in his legs. ''I'm pretty sure I'm going to get there.''
Perez (2-2) was wild all night, but didn't wilt. He walked a season-high seven in five innings, then left for a pinch hitter with a 5-2 lead. He allowed four hits and struck out two, throwing 55 of 108 pitches for strikes.
''He was flowing in and out of rhythm. It became very challenging for us,'' Manuel said. ''But one thing about Ollie, he competes and gives you everything he's got. And tonight that was enough to get him through five innings.''
Re-signed by the Mets to a $36 million, three-year contract in the offseason, Perez had been sidelined since May 3 because of tendinitis in his right knee. He opened the season 1-2 with a 9.97 ERA in five starts.
''I kind of felt like we let him off the hook a little bit,'' said Dodgers cleanup hitter Casey Blake , who walked four times. ''We needed a big hit and we didn't come up with it.''
Perez's return was the first piece of good news in weeks for the injury-ravaged Mets, still missing Carlos Delgado , Jose Reyes , Carlos Beltran , John Maine and J.J. Putz.
New York finally caught a break in the seventh, when Mark Loretta 's grounder caromed off first base and up in the air. A stumbling Murphy scooped up the ball and made a blind, behind-the-back flip to Parnell covering first base for the out.
''I just grabbed it and flipped it,'' Murphy said. ''That's just reaction right there, and being in the right place at the right time.''
Loretta put both hands on his helmet and manager Joe Torre came out to argue, to no avail.
''That was about as unlucky as I've been on a baseball field in my career,'' Loretta said.
Perez walked his first batter on four pitches - and none were close. The erratic left-hander issued three straight free passes in the third, but escaped unscathed.
He said he was ''a little nervous.''
''Sometimes you don't have command,'' Perez said. ''Just one of those games you have to keep your team in the game. I feel healthy. I feel strong. I know what I have to do to get better.''
Jeremy Reed doubled in the second off Hiroki Kuroda (3-5) and scored on Luis Castillo 's two-out infield single for New York's first run in 24 innings.
New York broke loose for three runs in the third to take a 4-1 lead. Murphy hit his second double and scored when Wright singled for his first RBI in seven games since June 30.
An error by Blake at third base allowed another run to score, and Reed added an RBI single.
Ramirez reacted late in left field on Murphy's first-inning double over his head. The Mets had gone 29 innings without an extra-base hit, matching a club record done 12 times previously - the last in 1992.