INDIANAPOLIS (AP) — Jimmie Johnson said a few prayers when he wrecked late in his Indianapolis 500 debut with his teammate in the lead.

The worst-case scenario after his No. 48 car slammed into the wall, spewed debris over the track and ground the race to a 12-minute, red-flag halt would have been a blown chance at the checkered flag for Marcus Ericsson.

Instead, the wreck only spoiled Johnson's race — Ericsson held on after the delay and pulled away for the Indy 500 win for Chip Ganassi Racing.

“I’m glad Marcus got it done,” Johnson said.

Ericsson held on to give Ganassi his fifth Indy 500 win. Johnson thought all month he could deliver the win to Ganassi, even in just his second IndyCar oval start and first open-wheel race at the Brickyard. He was never seriously in the mix Sunday — though he led two laps because of pit cycles — and his late wreck left him in 28th.

The seven-time NASCAR champion had no answer for how he lost control of his car.

“It turned around so fast,” Johnson said. “I was crashing and it was over. I had not had that issue into a corner yet where the back end wanted to come around. I was really surprised it was caught off guard.”

The destroyed car spoiled an otherwise fantastic May for Johnson where he was the toast of IndyCar. Johnson soaked in all the sights and sounds of the Brickyard and already hoped he could try it again next year.

Johnson was pulled tight by Indianapolis 500 great Dario Franchitti for some last-second encouragement before the race and then worked the rope surrounding his car — mobbed with fans, friends and family like no other driver — and hugged and high-fived everyone he could reach. His old NASCAR crew chief Chad Knaus watched from nearby.

Then came Johnson’s girls. The family that Johnson passionately persuaded to let him chase his boyhood dream and race the Indy 500 couldn’t let him go. Johnson’s two young daughters squeezed hard when they threw their arms around his waist and shoulders.

But daddy had to race.

With that, the seven-time NASCAR champion and one of the greatest drivers in auto racing history strapped on his helmet and slipped inside the 48 car, ready for his rookie race at Indy at 46 years old.

Johnson failed in his bid to join A. J. Foyt and Mario Andretti as the only drivers to win both the Indianapolis 500 and the Daytona 500. Andretti and Tony Stewart, members of Johnson’s former NASCAR team and even his dad, who worked the race as Johnson’s spotter, all sent video messages of support.

“I wish I had some advice to you that would be useful but you know what to do,” Andretti said.

Johnson walked out to driver introductions hand-in-hand with his two young daughters, Lydia and Evie. Johnson's ovation from more than 300,000 fans was topped only by the one for four-time Indy 500 champ Helio Castroneves.

Johnson’s wife, Chani, joined the family at the 48 car. Franchitti, the three-time Indy 500 champion, served as Johnson’s driving coach at Chip Ganassi Racing and appeared emotional as he hugged Johnson.

Johnson partnered with close friend and country music star Blake Shelton to honor family members who served in the military. Johnson’s helmet features a red, white and blue paint scheme along with black-and-white photos of his grandfather and Shelton’s brother and father.

“Any time Jimmie Johnson asks you to do something, you’re going to do it anyway,” Shelton said as he watched the opening laps. “But this was extra special.”

Johnson won 83 times in NASCAR, claimed a record-tying seven NASCAR championships and could have walked away from racing after 2020 with his legacy secure. But the four-time winner in NASCAR at the Brickyard just couldn't shake Indy.

And he's already eyeing 2023.

“Just so much fun to be here and be a part of this spectacle,” he said.

___

More AP Indy 500 coverage: https://apnews.com/hub/indianapolis-500 and https://twitter.com/AP_Sports