Updated

Russell Martin hit a pair of homers, including a solo shot in the bottom of the ninth inning, as the New York Yankees beat the New York Mets, 5-4, to complete a three-game sweep.

Jon Rauch (3-6), who recorded the final out in the eighth, stayed on to pitch the ninth. Martin stepped to the plate and smacked the ball over the wall in left to win the game for the Yankees.

Mark Teixeira and Alex Rodriguez had an RBI apiece for the Yankees, who swept the Mets in a three-game series at home for the first time since 2003.

Andy Pettitte gave up three runs -- two earned -- on five hits over six innings for the Yankees. Pettitte seemed to hurt his left hand in the sixth after he snared Scott Hairston's comebacker with his bare hand.

"No I'm good, it's swollen and as soon as the swelling gets out it will be fine," said Pettitte. "It got me right up high near the fingers. It was just hard to throw because I really couldn't feel the ball."

Boone Logan (1-0) recorded the final two outs in the ninth to pick up his first win of the season.

Jordany Valdespin had two RBI for the Mets, who have lost six of seven. Vinny Rottino and Ike Davis added an RBI apiece.

"Everybody goes through a bad stretch and this is ours," said Mets manager Terry Collins. "It didn't matter what move we made it didn't work. We just have to fight through it and pick each other up."

Mets starter Jon Niese gave up two unearned runs on seven hits over seven full frames.

The Mets gave Niese some early support by scoring three runs in the second inning. Hairston led off with a double down the left-field line and crossed the plate on Rottino's single up the middle. Omar Quintanilla walked and Mike Nickeas reached base on second baseman Robinson Cano's fielding error to load the bases with one out. Valdespin followed with a two-run double to right.

The Yankees finally got some runs off Niese in the seventh. With two outs, Andruw Jones reached first on third baseman David Wright's throwing error. Martin followed with a homer to right. The ball sailed over Hairston's outstretched glove and hit off the top of the wall before going over for a homer.

The home team tacked on two more runs in the eighth to go in front. Bobby Parnell started the inning on the mound for the Mets. Derek Jeter reached base on an infield single to shortstop. The ball rolled past a charging Quintanilla and Jeter went to second on the fielding error. Curtis Granderson followed with a single to put men on the corners. Teixeira and Rodriguez followed with back-to-back RBI singles for a 4-3 lead. Tim Byrdak came in and retired the next two batters. Rauch recorded the final out of the frame to keep it a one-run game.

But the Mets tied the game in the ninth. Rafael Soriano gave up a leadoff double to Lucas Duda. Davis followed with an RBI double to center. Quintanilla then hit a grounder to shortstop Jayson Nix. Davis was thrown out trying to go to third on the play. Pinch-hitter Daniel Murphy singled to put runners on the corners. Logan came in from the bullpen and got the final two outs to keep it 4-4.

Game Notes

The Yankees went 5-1 on a six-game homestand...The Yankees (34-25) are a season-high nine games over .500...The Mets fell to 1-5 on a nine-game road trip...The Yankees recorded their fourth series sweep of the season...Rodriguez collected his 1,918th career RBI, breaking a tie with Hall of Famer Eddie Murray for sole possession of seventh place on the all-time list.