NEW YORK (AP) -- The only way his 3,000th hit would have felt right to Derek Jeter was if it came in a Yankees win.
So, as with everything else Saturday, he took care of that himself.
Jeter homered for hit No. 3,000 and raced right past the milestone in a scintillating performance, going 5 for 5 with a tiebreaking single in the eighth inning that gave New York a 5-4 victory over the Tampa Bay Rays .
"It would have been really, really awkward to be out there doing interviews and waving to the crowd after the game if we had lost. So that was going through my head in my last at-bat today," Jeter said. "If we didn't win, it definitely would have put a damper on things."
Jeter doubled and had three singles while starting a pair of Yankees rallies and finishing off their last one. He bounced a single through the left side his first time up to give him No. 2,999, then sent a no-doubt drive deep into the left-field bleachers off Rays ace David Price in the third inning.
That made Jeter the 28th major leaguer to get 3,000 hits, one of baseball's biggest milestones, and the first to do it with the Yankees. Former teammate Wade Boggs was the only other player to reach the plateau with a homer.
"Hitting a home run was the last thing I was thinking about," Jeter said.
His shot set off quite a celebration in the Bronx, with teammates mobbing Jeter at home plate in a pack of pinstripes before he took a curtain call and saluted the sellout crowd of 48,103. The game was held up for 4 minutes, and Jeter also acknowledged the Tampa Bay players who applauded.
"It was a great moment for Derek and his family and the history of the Yankee franchise," said former teammate Johnny Damon , who led the cheers from the Rays dugout. "Derek stands for the good stuff in baseball. I'm proud of him. Everybody in this clubhouse respects Derek Jeter ."
What a moment for No. 2. His second hit of the game - and right at 2 p.m.
Moments later, a montage of messages from ex-teammates, including Andy Pettitte , was shown on the big video board in center field. By the fourth inning, the screen showed DJ3K merchandise flying off the shelves at Yankee Stadium souvenir shops.
The home run was Jeter's third of the season and first at home since an inside-the-park shot July 22, 2010, against Kansas City. But the 37-year-old captain was just warming up in a turn-back-the-clock performance - and the Yankees needed all of it.
Eduardo Nunez , perhaps Jeter's heir apparent at shortstop, doubled to start the eighth against Joel Peralta (2-4). Brett Gardner dropped down a sacrifice bunt to push Nunez to third and up stepped Jeter again, looking to cap his big day in style.
Tampa Bay brought the infield in and Jeter poked a two-strike pitch up the middle, giving New York a 5-4 lead and prompting another round of "De-rek Je-ter!" chants. A sign in the stands read "Mr. 3,000."
"I don't think you can script it any better. This is already movie-ready," Yankees manager Joe Girardi said. "It's just remarkable the day that he had."
Mariano Rivera got three quick outs for his 22nd save in 26 chances, his first outing since blowing a save Sunday against the Mets. Rivera was out of action for three days because of a sore right triceps before pronouncing himself available to pitch Thursday night.
Curtis Granderson caught Kelly Shoppach 's long drive at the center-field fence for the second out in the ninth, and the Yankees held on after losing four of their previous five games.
Granderson also had an RBI single to drive in Jeter in the fifth, and A.J. Burnett struck out nine in 5 2-3 innings. He left with a 4-3 lead, but Tampa Bay tied it in the eighth against David Robertson (2-0).
Damon led off with a triple and scored when Ben Zobrist grounded a single through a drawn-in infield.
Jeter, who has slumped much of the season, matched a career high with the first five-hit game for any player at the new Yankee Stadium, which opened in 2009.
The last player to reach 3,000 hits, Craig Biggio of the Houston Astros , did it with his third hit in a five-hit game on June 28, 2007.
Jeter's run-up to 3,000 turned into a winding, drawn-out journey, beginning with a calf injury June 13 that landed him on the disabled list for 20 days.
Six hits shy of the milestone, he returned in Cleveland on the Fourth of July and managed three hits in a three-game series.
Back home Thursday against Tampa Bay, Jeter laced the first pitch he saw for a double but then came up empty the rest of the night, disappointing a sellout crowd that came to see history.
The teams were rained out Friday and settled on a Sept. 22 makeup date because the Rays didn't want to play a split doubleheader this weekend. That left Jeter with only two more home games to reach the milestone before the All-Star break - the Yankees begin the second half with an eight-game road trip.
With a large throng of family and friends in town, he desperately wanted to hit the mark at home.
Lined up to pitch for the Rays? A pair of aces in Price and James Shields .
Pressure on Jeter, even in July? You better believe it.
But he delivered all day, even stealing a base Saturday after entering the game in a 4-for-18 slide.
"Nobody better in the clutch," said good buddy Jorge Posada , the first to greet Jeter with a bear hug after his home run. "He looks forward to that moment and today was a perfect example."
After crossing the plate, Jeter pointed up to the box where his father and steady girlfriend, actress Minka Kelly, were sitting. His mom and sister were absent, attending a christening.
"I was excited, but to be honest with you, I was pretty relieved," Jeter said. "I've been lying to you guys for a long time saying I wasn't nervous and there was no pressure. I mean, there was a lot of pressure to do it here."
Before the first pitch, thousands of fans lined up at ticket windows outside Yankee Stadium hoping to get in, even though an electronic sign read: "Today's game is sold out." Many of them were trying to exchange rain checks from Friday night, but there was no room in the packed house.
B.J. Upton hit a two-run homer for Tampa Bay, and All-Star outfielder Matt Joyce also went deep. Price lasted only five innings, giving up four runs and seven hits.
"I'd rather not be the answer to that trivia question, but I am," Price said. "It's tough. He's one of the best players ever to play baseball. He was going to do it off of somebody and it just so happened to be me."
NOTES: Yankees 3B Alex Rodriguez sat out. He has a slight cartilage tear in his right knee and was deciding whether to have surgery that could sideline the three-time MVP for about a month. Girardi said he expected a decision would be announced Sunday. ... RF Nick Swisher also was out of the Yankees' lineup because of a sore left quadriceps. ... Jeter improved to 9 for 28 (.321) with two home runs against Price. Jeter also homered off Price in the All-Star lefty's major league debut in September 2008. ... Jeter was back in his familiar leadoff spot. He had been set to bat second Friday night before the game was rained out. ... Damon returned to the lineup, batting leadoff as the DH in his first game since getting hit on the left hand by a pitch from Minnesota's Francisco Liriano on Wednesday.