Hamlin wasn't having it.

MARTINSVILLE, VIRGINIA - OCTOBER 31: Denny Hamlin, driver of the #11 FedEx Ground Toyota, impedes Alex Bowman, driver of the #48 Ally Chevrolet, celebration after winning the NASCAR Cup Series Xfinity 500 at Martinsville Speedway on October 31, 2021 in Martinsville, Virginia. (Photo by Brian Lawdermilk/Getty Images)

Alex Bowman won the NASCAR Xfinity 500 at Martinsville Speedway after taking Denny Hamlin out of contention for the win as they were fighting for the lead with seven laps to go.

Bowman, who had already been eliminated from the playoffs, lost grip as he tried to get by on the inside line and unintentionally bumped into Hamlin, spinning him out.

Bowman went on to hold off Kyle Busch and Brad Keselowski on the restart to win, ending their chances of making it to the championship four for next week's final in Phoenix.

Hamlin then pulled his Toyota in front of Bowman's Chevrolet just as he was about to do a victory burnout. As Bowman drove by him and did a 180 degree turn, Hamlin rammed the nose of his car into Bowman's and started pushing it backwards.

Hamlin's crew chief could be heard on the radio telling him, "be smart. Big picture. Big picture," as he backed off and drove away.

"I hate doing it," Bowman said of the contact during the race.

"I don't want to crash somebody and I just got in, got loose underneath him and spun him out."

Hamlin didn't mince words during a post-race interview televised live on NBC after finishing in 24th place.

"He's just a hack, he's just an absolute hack. He gets his a-s kicked by his teammates every week," Hamlin said.

"He's just terrible. He's just f--king terrible."

"I moved up as high as I could on the race track and he still can't drive."

CLICK HERE TO GET THE FOX NEWS APP

Even with the result, Hamlin qualified for the championship four on points along with Kyle Larson, Chase Elliott and Martin Truex Jr., who fought through some late race damage to finish fourth and punch his ticket to the final next Sunday at Phoenix Raceway, where he won in March.