MILWAUKEE -- Pedro Martinez impressed the Milwaukee Brewers even though he wasn't very pleased himself.
"Bad day, bad day," said Martinez, who still earned the victory. "I used my experience to keep the team in the game. My body didn't physically click. I didn't feel good the whole game. I kept my team in the game and that's all that matters."
Doug Mientkiewicz also homered, breaking a 5-all tie in the eighth inning with his shot off reliever Julio Santana (0-1) and helping the Mets to their fourth straight victory and pushing them three games over .500 for the first time this season.
"We feel good," Beltran said of the Mets, who improved to 17-14. "We feel like we're playing the game right. We're getting hits when we need them most."
Martinez (4-1) struck out 11 but allowed a season-high five earned runs in seven innings of his first career start against Milwaukee.
"He doesn't have too many off days," Brewers first baseman Lyle Overbay said. "For us, it's the first time we faced him, so we're trying to get the feel for him and the next thing you know he's striking you out and you haven't figured it out yet. It's kind of tough."
Mike DeJean pitched one inning, and Roberto Hernandez worked the ninth for his first save since 2002, when he pitched for Kansas City.
Martinez couldn't hold a 5-3 lead after Beltran hit his second homer in the seventh. He walked Carlos Lee leading off the bottom half before Overbay hit his sixth homer of the season.
"It's weird to see Pedro give up home runs," New York manager Willie Randolph said. "His changeup was up in the zone a bit. But he keeps you in the game. He finds a way to make pitches."
Beltran, who has hit all six of his homers in games started by Martinez, helped the Mets tie it at 3 in the fifth. With two outs, Milwaukee starter Wes Obermueller walked Mike Cameron before Beltran followed with a homer to right.
Obermueller, making his second start in place of Ben Sheets, allowed three earned runs and five hits in 4 2/3 innings.
"They've got some guys who can hit," Milwaukee manager Ned Yost said. "They've got a pretty potent lineup."
David Wright's second homer in two nights gave New York a 1-0 lead in the fourth before the Brewers finally got to Martinez in the bottom half.
Brady Clark was hit by a pitch leading off and took third on a single by J.J. Hardy -- Milwaukee's first hit. After Geoff Jenkins struck out, Lee hit his fifth homer, only the second allowed by Martinez this season.
"We maximized our hit output, that's for sure," Yost said. "Carlos got a good pitch to hit and so did Lyle."
Boston is the only team Martinez has yet to face. He has 101 career games with at least 10 strikeouts. ... Lee has an RBI in six straight games. ... New York has won six straight against Milwaukee. ... The Mets homered four times for the second consecutive game. ... Sheets is on the 15-day disabled list with inflammation of the inner ear. ... The Brewers are 7-19 at home against the Mets. ... Milwaukee has scored at least four runs in its last nine games.