RICHMOND, Va. — Matt Kenseth could breathe a huge sigh of relief after a bizarre accident caused by an ambulance nearly cost him a spot in the 16-driver NASCAR playoff field.

The accident ended Kenseth’s night, but he made the playoffs thanks to a Kyle Larson victory Saturday night in the NASCAR Cup regular-season finale at Richmond Raceway.

Kenseth would not have made the playoffs, which begin next weekend at Chicagoland Speedway, if a driver in a must-win situation had won the race. Kenseth would have been third in points among the winless drivers in the regular season, and there would have been only two spots available on points.

He had led 89 laps of the first half of the race and was in good position to make it on points if he didn’t win when the caution came out and he went to pit with 143 laps remaining. An ambulance, though, had stopped at the entrance to pit road, and in the logjam as cars tried to weave around the ambulance, he ran into the back of Clint Bowyer.

“Kind of a weird series of events there,” Kenseth said. “It didn’t turn out good for us. … Yeah, I was surprised [to see it].”

Kenseth later tweeted a photo of himself, positioned next to an ambulance, as he left the track.

NASCAR senior vice president Scott Miller said the ambulance driver did not follow the directive to stop well before it got to the entrance of pit road. He said NASCAR will investigate what happened.

“It is not a common occurrence for us,” Miller said about the mistake. “It was a very strange thing. The track workers are usually very, very good at following directives.”

Martin Truex Jr., the regular-season champion, said the incident left him flabbergasted.

“Whoever hits the button to open pit road needs to pay attention to what’s going on on the racetrack,” Truex said. “It’s not like it was a big surprise. It didn’t happen in a split second. … Somebody obviously wasn’t paying attention or wasn’t doing their job probably, and in my opinion at this level, it’s inexcusable.”

NASCAR has an official whose sole job during a race is to dispatch emergency equipment. Another official can direct emergency equipment so cars can get by them on the track and determines whether pit road is clear and ready for cars to enter.

“I have never ran one of these races before, but I sure would think that up in the tower, you’re calling pit road and all of a sudden you see an ambulance sitting in the middle of the pit-road entry, you’d probably close it for a lap and wait until it clears out,” Kenseth said.

“It’s easy for me to say if I’m standing here instead of racing.”

Kenseth said he wouldn’t begin to lobby for a spot in the playoffs if he had missed the cut because of the NASCAR mistake.

“That’s just part of racing,” Kenseth said. “This is 1/26th of the season … and every race is equally as important. It’s no better, no worse than any of our other five DNFs or whatever we’ve had this year.

“It’s just been an awful year as far as finishing races and having trouble and getting in wrecks.”

There is precedence for NASCAR to add another driver to the playoffs, although Kenseth said before knowing he got in that he likely wouldn’t lobby for an exception. Jeff Gordon was added in 2013 after NASCAR determined that Michael Waltrip Racing drivers brought out the caution and pitted at certain times to get one of their drivers in at Gordon’s expense.

“If we can’t be in the top 16 after 26 races, we probably didn’t deserve to be there,” Kenseth said before knowing he got into the playoffs. “We are working at it as hard as we can. We’ve been running good. Unfortunate circumstance, but hopefully we’ll still get in.”

Kenseth could smile a little bit after the race, which featured a caution with four laps remaining that created a double-file restart for a green-white-checkered finish. Without that caution, Truex likely would have won and allowed those drivers needing a win one last chance to capture the victory amid what often is mayhem in a two-lap dash to the finish (Truex ended up in the wall).

“It was a frustrating ending to watch on TV, to be honest with you,” Kenseth said. “The whole thing on pit road, getting crashed out and that late caution to watch a demo[lition] derby restart, I am not really a big fan of that kind of racing.

“So that wasn’t that great to watch. I’m glad we made it in, and hopefully we do something now that we’re in it.”