Matt Kenseth won a very entertaining Can-Am 500 at Phoenix International Raceway on Sunday.

The story line heading into the NASCAR Monster Energy Series race at PIR was the anticipated battle between 5 drivers for the single remaining spot to race for the series championship next week at Homestead-Miami.

Kenseth was not one of those drivers. He had already been eliminated from the chase on a pit road technicality weeks prior.

The 39th victory of his career was extra sweet in light of the fact that he made the announcement that he would be stepping away from the sport at the end of this season. Earlier this year, Joe Gibbs Racing announced that Kenseth’s contract would not be renewed for the 2018 racing season.

“Just got one race left and everybody dreams of going out a winner,” a tearful Kenseth said after climbing from his Toyota.

The most intense on track action took place between Chase Elliott and Denny Hamlin. Both drivers were fighting for that crucial win to put them in at Homestead. The pair had a recent beef dating back to Martinsville earlier this season where Hamlin wrecked Elliott with a few laps remaining in that race. In what many considered to be karma, Hamlin and Elliott found themselves bumper to bumper, and ultimately fender to fender often throughout the race.

Hamlin appeared to have the better car and led the most laps, but in the late stages, Elliott was able to get by him for the lead, forcing him into the outside wall in the process. Four laps later, Hamlin would blow a tire, ending his day, and all hopes of racing for the championship.

When asked about the incident, Hamlin said, “It just proves to the people who thought I was a bad guy that he would do the exact same thing under the same circumstances,” Hamlin said. “I got into him and he chose to retaliate.”

Elliott would lose the lead to Kenseth with 10 laps remaining. That series of events allowed Brad Keselowski, who finished in 16th place, to advance in the playoffs through points.

This weekend also marked the final appearance by Dale Earnhardt Jr at Phoenix International Raceway. NASCAR’s most popular driver is retiring from the driving aspect of the sport at the end of the season.

Can-Am 500 weekend gallery: All photos by Kevin C Cox/ CORE360 Sports