Published: Sunday, March 24, 2013 at 10:41 p.m.

Last Modified: Sunday, March 24, 2013 at 10:43 p.m.

FONTANA, Calif. — Denny Hamlin and Joey Logano raced side by side into the final lap, two bitter rivals unwilling to give even an inch — right up until they made contact with less than a mile to go.

The race ended with Hamlin in the hospital, Logano in a shoving match with Tony Stewart, and Kyle Busch celebrating a victory that seemed secondary to all the fury at Fontana.

Hamlin was airlifted away from the track Sunday after a collision with Logano on the penultimate turn sent him nearly head-on into the inside wall, putting a spectacular finish on the fifth race of the NASCAR season.

Logano managed to finish third despite wrecking into the outside wall after hitting Hamlin, who spun Logano last week at Bristol and sparked a bitter post-race confrontation that didn’t cool off during the past week.

“He probably shouldn’t have done what he did last week, so that’s what he gets,” Logano said.

Yet the 22-year-old Logano might have even bigger worries than his burgeoning feud with Hamlin, whose team expects him to be fine. Stewart got into a post-race shoving match with Logano, with the three-time champion threatening to “whoop his (butt)” after Logano aggressively blocked Stewart out of a late restart.

“It’s time he learns a lesson,” Stewart said. “He’s run his mouth long enough. ... He’s nothing but a little rich kid that’s never had to work in his life, so he’s going to learn what us working guys who had to work our way up (know about) how it works.”

Almost forgotten in the post-race frenzy was Busch, who led 125 of 200 laps in his Toyota and earned his first victory of the season when he sped past Hamlin and Logano on the final turn. Dale Earnhardt Jr. also ceded the spotlight, even though NASCAR’s most popular driver moved into the Sprint Cup Series points lead with his second-place finish.

Even without Busch and Junior, NASCAR’s closest race to Hollywood had an abundance of drama.

“I’m tired of these guys doing that stuff, especially out of a kid that’s been griping about everybody else, and then he does that the next week,” Stewart said, referring to Logano’s complaints about other drivers’ similar moves.

“He sent Denny to the hospital and screwed our day up. He’s talked the talk, but he hasn’t walked the walk yet.”

After a fairly entertaining race highlighted by Logano’s aggressive move to block Stewart out of the final restart, the last lap developed into a spectacle pitting rivals already angry at each other about driving tactics.

Hamlin spun Logano at Bristol while Logano was racing for the late lead on that tight Tennessee bullring. Hamlin claimed Logano had cut him off three times earlier in the race, but Logano ran over to Hamlin’s car afterward and leaned in his window for an angry exchange before the teams pulled them apart.

On Friday, Hamlin said he hoped the beef with Logano was finished, but Logano said he hadn’t received any apology and wasn’t feeling particularly forgiving.

They ended up racing together again in the opening laps at Fontana, with Logano practically grazing Hamlin’s bumper early on. Their final-lap theatrics on Fontana’s wide two-mile track appeared to be motivated by fierce racing for a win, not revenge.

They were side-by-side heading into the final lap and largely stayed that way until Turn 3, where Logano began to work up the track. The cars made contact and eventually lost control, with Logano hitting the wall while Hamlin slid inside and made heavy contact with the wall.

Hamlin got himself out of the car, but then slumped to the ground beside it before an ambulance arrived. He was eventually airlifted out because of traffic around the track.

NASCAR didn’t immediately have an update on his condition, although JGR President J.D. Gibbs thought Hamlin would be fine. Hamlin’s girlfriend, Jordan Fish, tweeted that Hamlin was “alert n awake, main concern is his back.”

“We were super fast, led a lot of laps,” Logano said. “Nothing to hang our head down about, that’s for sure.”

Stewart, the defending Fontana champion, then got his crack at Logano, who went extremely low to block Stewart out of the last restart, killing Stewart’s momentum and consigning him to a 22nd-place finish.

“I had to throw the block there,” Logano said. “That was a race for the lead. I felt if the 14 got underneath me, that was going to be the end of my opportunity to win the race, so I was just trying to protect the spot I had.”

Stewart ran over to Logano’s car and confronted him after the race, shoving the younger driver — who then threw a water bottle at Stewart, the veteran said — before teammates pulled them apart.

Stewart was replaced by Logano at Joe Gibbs Racing when Stewart left to drive for his own team starting in 2009.

“What the hell do you think I was mad about?” Stewart asked before providing a colorful series of expletives.

Roger Penske, in St. Petersburg, Fla., for the IndyCar race, firmly backed Logano, who was hired by Penske Racing last September.

“I think it’s great,” Penske said. “I think (Logano and Hamlin) have got to work it out themselves. He knows what the big picture is. To get yourself knocked off the track every other weekend, you’ll never get in the Chase and have a chance to win the championship, so I think cooler heads will prevail. He said, ‘I’m going to be around a long time,’ was his comment to me.”

Busch took advantage of his remarkable stroke of luck to pick up JGR’s first victory at Fontana, the only track where the team had never won. Toyota also got its first Fontana win.

“They forgot about me. I knew they were going to,” Busch said. “We had a good run on the top side, and they were messing with each other so bad that they took each other down. I was just hoping I could get by before they took me with him.”

Earnhardt turned in yet another solid race and passed Brad Keselowski atop the points standings despite falling from third to 22nd late in the race with a dismal pit stop.

Carl Edwards came in fourth, with Kurt Busch fifth. Keselowski finished 23rd after starting at the back, missing the top five for the first time all season.

Kyle Busch’s victory was his 25th in NASCAR, completing his ninth career weekend sweep after his Nationwide Series victory Saturday. He ended a 31-race Cup winless streak since last April at Richmond.

“Oh, by the way, I won the race today,” Busch said. “That might be a story. I’m sure it’s not, though.”