FONTANA, Calif. — Denny Hamlin was airlifted to a local hospital Sunday after he and rival Joey Logano wrecked while battling for the lead on the final lap at Auto Club Speedway.

Hamlin and Logano, who nearly came to blows after Hamlin wrecked Logano last week at Bristol Motor Speedway, collided and crashed while battling for the lead, allowing Kyle Busch to squeeze by them to win the race.

Logano was on the inside of Hamlin as they raced into Turn 4 on the final lap while Busch had a run on the outside.

With Hamlin a nose ahead of Logano, Logano drifted up the track and ran into the side of Hamlin’s car. Both drivers crashed into the wall and Hamlin’s car shot back across the track before slamming nose-first into the inside wall. Hamlin’s car hit the wall so hard that the impact lifted his car off the ground.

“Denny Hamlin was not going to win that race,” Logano said before knowing that Hamlin was injured and had been taken to the hospital. “I wanted to win that race. I feel like I had the car to win the race.”

Hamlin climbed from his car but immediately dropped to the ground. He was attended to by safety workers, who put him in an ambulance.

He was taken to the infield care center, where he was awake and alert, and then transported to a local hospital. He was flown to a hospital because of traffic but he was expected to be OK, Joe Gibbs Racing president J.D. Gibbs said.

A statement from JGR later said that Hamlin was complaining of back pain and was being held for observation overnight.

"Hamlin complained of lower back pain at the track’s infield medical center and was transported to a local hospital for further evaluation," the JGR statement said. "Hamlin will remain at the hospital overnight for observation."

Logano used to drive for JGR before being replaced by Matt Kenseth after last season. Hamlin and Logano, who now drives for Penske Racing, had a postrace confrontation last week at Bristol after Hamlin spun Logano while battling for second.

Still steaming from that incident, Logano was determined to beat his former teammate on Sunday. He was racing on worn tires while Hamlin had fresh tires after pitting during the final caution period.

“It was just racing for the lead,” Logano said. “I guess we’re even now. He’ll think twice before he does something next time.”

Logano, who led 41 laps, finished third. Hamlin finished 25th.

“I was trying to get to the bottom, I overdrove the bottom and slid up,” Logano said.