Aric Almirola won the Xfinity Series race Saturday at Martinsville Speedway, a victory that gave Cole Custer a chance to defend his NASCAR championship.

Almirola is running a part-time schedule for Joe Gibbs Racing so he wasn't playoff eligible. AJ Allmendinger and Austin Hill had already qualified for the playoffs, so there were two open slots for six drivers.

The win by Almirola, his third of the season, allowed the final two slots in the championship race to be decided on points. But, Almirola over a final 16-lap sprint to the finish had to hold off both Sammy Smith and Chandler Smith, either of whom would have made next Saturday's title-decider at Phoenix Raceway with a win at Martinsville.

“Wow. What an amazing race car," Almirola said. "It was so hooked up. It would just do everything I wanted it to. This is such a special place. This is by far my favorite racetrack.

"We are going to go race for an owners' championship in Phoenix.”

In the driver championship, the final two spots went to Custer, the reigning Xfinity Series champion, who finished fourth, and Justin Allgaier, who finished fifth.

Chandler Smith and Custer had battled for position late in the race that infuriated Smith and caused him to confront Custer after. The heated confrontation led to Smith throwing a punch at Custer.

Custer said the two have been feuding much of the season, while Smith intimated he'll race Custer hard next Saturday.

“I’m in a must-win situation. He was not at that moment, and he didn’t even try to make the corner,” Chandler Smith said. “Granted I moved him the lap before, but I’m beating his bumper off for the five laps before that. I gave him grace, before I finally shipped him, and then he doesn’t even try to give me a chance going into turn one. It is what it is.”

It wasn't Custer's only dust-up of the race: Custer tangled early with Allmendinger and it ended with Allmendinger crashed.

The two were racing just 12 laps into the race and Custer was trying to get past Allmendinger. Custer gave him a shove that wiggled him out of line. Allmendinger then tried to force his way back to the bottom of the track. He ended up crashing.

“I had to go, he wasn't going to take it, took himself out,” Custer said on the radio.

Allmendinger, like Chandler Smith, seemed displeased with Custer.

“Can't wait to get to Phoenix,” was Allmendinger's terse response to the incident.

And, when told that Custer had said Allmendinger wrecked himself, Allmendinger again deflected.

“We're going to go win a championship, so that's the mindset,” Allmendinger said. “It's all good.”