NEW YORK -- Derek Jeter stood at first base and waved his batting helmet, cheers resonating from the upper reaches of a packed Yankee Stadium.
After tying Lou Gehrig atop the Yankees hit list, the ever-confident captain suddenly wasn't so sure of himself.
"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."
Jeter broke out of his slump in a big way Wednesday night, getting three hits to match Gehrig's franchise mark, and New York rallied for a 4-2 victory over the Tampa Bay Rays thanks to a three-run homer by pinch-hitter Jorge Posada in the eighth inning.• Freeman: Jeter's true greatness
Jeter tied Gehrig with 2,721 hits in a Yankees uniform, a mark the Hall of Famer had held by himself for more than 70 years.
"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."
Moments after Posada's homer, Jeter received a booming ovation as he stepped to the plate in the eighth with a chance to break the record. But he walked against reliever Grant Balfour, bringing a loud chorus of boos from the crowd.
The Yankees are off Thursday. Jeter gets his next chance to set 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 straight 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.
"I felt proud. I got goose bumps," Posada said. "It was a perfect moment."
"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.• Knobler: Rays will be back ... without breaking bank
Jeter took off his helmet and twice waved it to the crowd of 45,848 during an ovation that lasted about two minutes. Rays players and coaches clapped as Jeter stood at first base.
"I'm very happy for him," Rays manager Joe Maddon said. "He carries himself in a manner that's worthy of passing Gehrig."
After entering the game in an 0-for-12 slump, his longest hitless stretch this season, Jeter snapped out of the rut with a bunt single toward third base leading off the bottom of the first. 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 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.
"I don't want to say it was a relief," Jeter said. "Afterward I was pretty excited that I was able to do it tonight."
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 stole 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.
Gehrig's career ended suddenly in 1939 because of illness. Two years later, he died at 37 from the disease that would later bear his name.
A key throwing error by Richard helped the Yankees rally in the eighth. Posada, one of Jeter's best buddies, connected off Balfour with one out to give New York a 4-2 lead and raised his arm as he rounded first base.
"It would be tough to lose a game when he ties Lou Gehrig, so we needed to win this one," Posada said.
Jonathan Albaladejo (5-1) pitched two scoreless innings for the win.
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.
- Jeter was back at shortstop after a night as the DH.
- B.J. Upton (sprained left ankle) started in CF for the Rays but was lifted in the sixth and replaced by Fernando Perez.
- Bartlett drove Chamberlain's fourth pitch to left for his second homer in two games and second career leadoff shot. Both have come this season at Yankee Stadium.