The loss snapped a modest two-game winning streak for the Pirates.
Martinez tossed seven innings and limited the Pirates to one run on five hits while striking out nine. With the victory, Martinez raised his record to 10-3.
Pirates manager Lloyd McClendon says Martinez was very tough.
"He pretty much did what he wanted to do when he wanted to do it," McClendon said. "He pitched in and out, up and down. He used all four parts of the plate. He did a nice job. Particularly when you give a guy like that a lead, it's going to be awfully tough to fight back against him."
Pittsburgh's All-Star outfielder Jason Bay felt that Martinez was on top of his game.
"He's one of the best for a reason," Bay stated. "Just like you talk about anybody else that throws a good game, he's dominating with all his pitches, not just one. He can throw any of his pitches for a strike whenever he wants to, and that's what makes him so effective. When you're looking for an offspeed pitch, he can dial it up to 92 or 93 [mph] still, if he wants. When you get up for that, he's got the offspeed and [when he's] putting it where he wants, he's very tough."
Mets manager Willie Randolph got exactly what he expected from Martinez.
"It was a typical Pedro game. I keep saying that, but it's the truth," said Randolph. "He pitches and keeps you in the ballgame. If they score off him, he gets strong and bears down. Today was almost a carbon copy of what we've seen from him this season."
Right-hander Kip Wells started for Pittsburgh, giving up five runs on nine hits in five innings of work. Wells absorbed the loss, falling to 6-9 on the season.
"I thought Kip battled well," McClendon said. "We had a couple botched plays that probably could have helped him out quite a bit. The only reason we took him out was the pitch count got up there so quickly because of the tough fifth inning that he had. We probably should have made a couple plays that we didn't make. It was certainly not a good way to finish the first half for him and I'm sure he's disappointed, but I look for good things from Kip in the second half."
Wells, who was coming off a complete-game 3-0 shutout of the Phillies on July 5, was tagged by the Mets for two runs in the top of the first inning. Jose Reyes singled and came around to score on Carlos Beltran's two-run homer to right field. It was the 10th home run of the season for Beltran.
"My command might not have been as good," Wells lamented. "There again, I had some situations where I didn't want to give them anything to hit. On the one hand, it works against you because you fall behind in the count and you've got to work from behind, but at the same time, you can't afford to let any more damage ensue. Obviously, it happens at times, but after the home run in the first inning -- at that point, you've just got to try and go out there and put up zeroes. As far as weathering the storm is concerned, I've just got to find a way to get through innings without putting up crooked numbers."
New York added three more runs in the top of the fifth inning. Miguel Cairo singled, advanced on a fielder's choice and swiped third, his eighth stolen base of the season. He then scored on Reyes' third single of the game.
Mike Cameron then stroked a two-run double down the left-field line, knocking in Martinez and Reyes and giving the Mets a 5-0 lead.
Wells was removed from the game after tossing 35 pitches in the fifth inning. Right-hander Ryan Vogelsong came on in relief in the sixth inning.
Pittsburgh broke through against Martinez for a run in the bottom of the fifth inning. Pinch-hitter Bobby Hill singled with two outs. Matt Lawton drew a walk, and Rob Mackowiak smacked an RBI single to center, cutting the Mets lead to 5-1.
The Mets nicked Vogelsong for a run in the top of the sixth on back-to-back doubles by Ramon Castro and Cairo.
Pittsburgh finished the first half of the season at 39-47 and in fifth place in the National League Central.
McClendon is looking for better things in the second half of the season.
"I see us as being very productive in the second half," McClendon explained. "I don't know what the final record is going to be. You look at our club when we match up against other clubs, and, position by position, we're challenged on a daily basis.
"I don't question the heart of these players and the desire to go out and win. They've shown it time and time again. If our pitching comes through in the second half and gives us the dominant performances that we know that they can give us, then certainly we're going to have opportunities to win quite a few ballgames."
George Von Benko is a contributor to MLB.com. This story was not subject to the approval of Major League Baseball or its clubs.