CHARLOTTE, North Carolina — It was hardly NASCAR’s finest moment when an ambulance clogged the entrance to Richmond’s pit road in a freak incident that could have ruined the regular-season finale.

A caution in Saturday night’s race — the one that finalizes the field for the playoffs — sent cars to pit road for a routine stop. But for reasons NASCAR does not yet know, an ambulance had parked itself along the route and immediately bottlenecked the traffic.

NASCAR got lucky that no one was injured as cars frantically darted around the ambulance. Some couldn’t slow in time and drivers began running into each other. Matt Kenseth got the worst of it — his hood was crumpled and his night was instantly over.

Had that incident cost Kenseth a spot in the playoffs, NASCAR would have had a huge mess to clean up before the playoffs begin this weekend at Chicagoland Speedway. Kenseth was not locked into the 16-driver field, and a first-time winner on the season would have bumped him out of the playoffs.

Although Kenseth remained calm when his fate was taken out of his hands, regular-season champion Martin Truex Jr. was furious.

“Whoever hits the button to open pit road needs to pay attention to what’s going on on the racetrack,” Truex said. “Somebody obviously wasn’t paying attention or wasn’t doing their job probably, and in my opinion at this level, it’s inexcusable.”

It was a bad look for NASCAR in a very big race, and NASCAR knows it has to clean that up before its showcase playoffs begin Sunday.

NASCAR senior vice president Scott Miller said the ambulance driver did not follow the directive to stop before pit road, while noting the screw-up is “not like this is a common occurrence for us. It was a very strange thing.”

Still, Miller agreed with Truex that pit road should have been closed the moment the ambulance was spotted.

“Those calls are very dynamic. They happen very, very quickly,” he said. “It’s the race director in charge of pit road open and closed. The track services and safety crew is in charge of the other. We didn’t sync up tonight. We will make sure we don’t let that happen again.”

It hardly made for the happy moment NASCAR had been hoping to create.

In the race, Kyle Larson and his Chip Ganassi Racing team needed a break, and it came with two laps to go.

Running second to a dominant Martin Truex Jr. and itching for fresh tires and a shot at victory in overtime, Larson got it when Derrike Cope’s car hit the wall, bringing out the seventh yellow flag of the night. Larson grabbed the lead on pit road and sailed to the victory.

“I guess we stole the win, I guess you could say, or our pit crew, I felt like, stole the win because they got me off as the leader,” Larson said.

The victory was his fourth of the season, tying Truex for the most this year.

“I’m really pumped for the playoffs, we’ve got a really good shot at the championship,” Larson said. “I’ve got the greatest team out here and definitely the best pit crew. They were money all night long to gain spots. This win is a huge congrats to them.”

And to the 58-year-old Cope, who was starting his 13th race of the season and hasn’t finished better than 31st. He was 38th at Richmond.

Truex, who clinched the regular-season NASCAR Cup title last week, had the race easily in hand until Cope crashed with under four laps remaining. Truex then wrecked in overtime while racing with Denny Hamlin for position. The sequence cost him his fifth win of the season.

“A caution for a guy who shouldn’t even have been out there,” Truex said about Cope. “It’s kind of ridiculous.”

Dale Earnhardt Jr. was officially eliminated from the playoffs with a 13th-place finish. He’s retiring at the end of the season, and has never won a Cup title. Earnhardt stayed out during late green-flag pit stops, briefly assuming the lead with 66 laps to go, but the caution that could have made the strategy pay off never came.

“That’s what we needed at the moment, and we didn’t get it,” Earnhardt said. “It was the only shot we had.”

Truex will still start the 10-race playoff stretch as the favorite to win the championship because he earned the most bonus points during the regular season. He and his Furniture Row Racing team were presented with the regular-season championship trophy.

The reward is a slew of bonus points, but Truex feigned a smile because he’d have preferred to have the race winning trophy, too.

“Tonight is a little tough, it’s a little hard to be excited,” he said.

He’s also got to watch over his shoulder for Larson, who now has a nice bit of a momentum going into the opening round of the playoffs at Chicagoland.

The Richmond victory was Larson’s first on a short track in the Cup Series.

“This has been a dream season for me, and we still have a long way to go,” Larson said,