Derek Jeter tied Lou Gehrig atop the Yankees hit list and New York rallied for a 4-2 victory over the Tampa Bay Rays on Wednesday night thanks to a three-run homer by pinch-hitter Jorge Posada in the eighth inning.

Jeter got three hits to match Gehrig with 2,721 in a Yankees uniform, a mark the Hall of Famer had held by himself for more than 70 years. Jeter had a chance to break the record, but he walked against reliever Grant Balfour after New York's comeback in the eighth.

"He's one of the classiest people to ever play this game," Jeter said during an on-field, postgame television interview pumped over the stadium public address system. "It's just kind of mind-boggling to have my name next to his."

The Yankees are off Thursday. Jeter gets his next chance to break the record Friday night at home against Baltimore.

"I have a pretty good feeling that it's going to happen pretty quickly," manager Joe Girardi said.

Shut down by rookie Jeff Niemann most of the night, the Yankees completed a four-game sweep and sent the AL champion Rays to their eighth consecutive loss. It's their longest skid since dropping eight in a row in July 2007.

Already on their feet in anticipation, fans at Yankee Stadium let loose with a roar when Jeter's sharp grounder inside the first-base line got by a diving Chris Richard in the seventh.

Jeter's parents, watching from an upstairs box between home plate and first base, raised their arms and exclaimed in excitement.

"This is definitely a memorable moment. We had so many great moments in the old stadium. This is the one I'll remember in this stadium so far," Jeter said.

Jeter took off his helmet and twice waved it to the crowd of 45,848 during an ovation that lasted about 2 minutes. Rays players and coaches clapped as Jeter stood at first base.

"I really didn't know what to do because we were losing at the time and I didn't want to disrespect Tampa," Jeter said. "I never dreamt about all of this."

After entering the game in an 0-for-12 slump, his longest hitless stretch this season, Jeter broke out of the rut with a bunt single toward third base leading off the bottom of the first inning. He beat the play without a throw, bringing a standing ovation from the crowd.

"That's why I bunted in the first inning. I needed to get one hit, right?" Jeter said.

With cameras flashing all around the ballpark on every pitch to Jeter, he grounded out in the third inning against Niemann and drove a ground-rule double to straightaway center in the fifth.

On his first chance to tie Gehrig, Jeter came through in fitting fashion _ with an opposite-field hit on the first pitch.

In the middle of the eighth inning, the large video board in center field showed a replay and flashed "Congratulations Derek!"

"What an ovation I got from the fans," he said. "I've been trying to do it for them."

Jeter also swiped second base in the first inning for his 300th career steal, which ranks second on the franchise list behind Rickey Henderson (326).

Gehrig's final hit came on April 29, 1939, a single against the Washington Senators. The Iron Horse had held the club record for hits since Sept. 6, 1937, when he passed Babe Ruth.

A key throwing error by Richard helped the Yankees rally in the eighth. One of Jeter's best buddies, Posada, connected off Balfour with one out to give New York a 4-2 lead and raised his arm as he rounded first base.

Jonathan Albaladejo (5-1) pitched two scoreless innings for the win.

With star closer Mariano Rivera getting a night off, Phil Coke struck out pinch-hitter Gabe Kapler with a runner on for his second save.

Lance Cormier (2-3) took the loss.

With the Yankees limiting Joba Chamberlain's workload this season, the 23-year-old right-hander was pulled after three innings for the third straight start.

NOTES: Jeter was back at shortstop after a night as the designated hitter. ... B.J. Upton (sprained left ankle) started in CF for the Rays but was lifted in the sixth and replaced by Fernando Perez. Upton made a three-base error when he missed Robinson Cano's deep drive with two outs in the second, but Niemann escaped unscathed. Upton charged in for a basket catch to end the fourth. ... Yankees reliever David Robertson, shut down Tuesday because of stiffness in his right elbow, is headed to see noted orthopedic surgeon Dr. James Andrews on Thursday, Girardi said.