Russell Martin led off the ninth with his second homer of the game and the New York Yankees took advantage of some shoddy infield defense to beat the Mets 5-4 Sunday for a three-game sweep.
The Mets could not hold an early 3-0 lead, but tied it at 4-4 in the top of the ninth on Ike Davis' RBI double off reliever Rafael Soriano.
In the seventh, Martin hit a two-run homer off the top of the wall in right field after third baseman David Wright's throwing error extended the inning to pull the Yankees to 3-2.
Mark Teixeira tied it at 3-3 with an RBI single in the eighth and Alex Rodriguez gave the Yankees the lead with a bloop single.
Martin started the ninth and hit a full-count pitch off Jon Rauch (3-6) to left field.
Boone Logan (1-0) got two outs with runners on first and third in relief of Soriano, who blew his first save chance since filling in for the injured Mariano Rivera.
The Mets took a 3-0 lead against Andy Pettitte in the second inning with help from second baseman Robinson Cano's fielding error and Jonathon Niese pitched repeatedly out of trouble for much of the day to make it stand up for seven innings.
But the Yankees rallied with help from errors by Wright and shortstop Omar Quintanilla. The Yankees are 7-2 in June.
Derek Jeter led off the eighth with a slow hopper that went under Qunitanilla's glove and rolled into the outfield. Jeter was given a single and he hustled into second base with a headfirst dive on the error.
Curtis Granderson then hit his second opposite field single of the game to left, off Bobby Parnell, to put runners on first and third. Teixeira followed with a tying hit a day after he gave the Yankees the lead with a two-run homer.
Rodriguez, who was booed when he hit into a double play to end the sixth, hit a shallow fly for the lead.
The Mets scored more than three runs against the Yankees for the first time in 11 games and for the first time in their past five games this season and have lost six of seven overall.
On Friday, managers Joe Girardi and Terry Collins each said they'd be taking a rooting interest in the team from the other borough next week. The Yankees next head to Atlanta to face the Mets' foe in the NL East. The Mets in turn can help the Yankees in the AL East standings with three games against Tampa Bay in Florida.
Making his 51st interleague start, matching Livan Hernandez for most all time, Pettitte raced through the top of the Mets order with only seven pitches in the first. He then needed 36 pitches in the second as the Mets scored three runs.
Scott Hairston led off with a double and scored on Vinny Rottino's single to center. After Cano booted Mike Nickeas' grounder near second base for an error, Jordany Valdepsin had a two-run double. A walk to leadoff batter Andres Torres loaded the bases.
Jason Bay, batting second because of his success against Pettitte, struck out as did David Wright to end the threat.
Bay is 0 for 11 since returning from a broken rib on Friday night. He hadn't played since April 23.
The Yankees put the leadoff batter on against Niese five times in seven innings but came up empty until the seventh. The Yankees hit into three double plays to help quash threats.
Given an extra day of rest after leaving his most recent start with an accelerated heart rate, Niese appeared to get out of seventh inning when Andruw Jones hit a grounder to Wright. Wright spun and made the throw into the dirt.
Martin followed with his homer. His homer in the ninth was the third walkoff homer of his career.
Pettitte twice caught runners breaking toward second with his deceptive move that has notched 99 career pickoffs. This time Hairston, in the third, and Wright, in the fifth, were thrown out at second for a caught stealing.
Pettitte gave the Yankees a scare in the sixth when he snared Hairston's comebacker with his bare hand and threw him out. Girardi and trainer Steve Donohue raced out to the mound and after several minutes of deliberation and a few practice pitches, Pettitte remained.
He retired the side in order then was greeted by a pat on the shoulder by Jeter at the dugout.