He has four victories this season, including in Sunday’s Autotrader EchoPark Automotive 400 at Dover International Speedway on Sunday. Hamlin has 10 top-five finishes to his name, too, and he occupies fourth place in the standings with an eye already on the upcoming postseason campaign.

The end of the uncertainty surrounding the future of JGR’s star driver, who co-owns Cup Series outfit 23XI Racing with Michael Jordan, could not have come at a better time for the team, with just five races remaining until the playoffs begin.

Earlier this season, Hamlin hinted in an appearance on Dale Earnhardt Jr.’s podcast that he could quit JGR to race for his own team. “I think that running some at 23XI is something that I’d like to do,” Hamlin said.

Don’t miss

“Joe Gibbs Racing’s been amazing to me over the 20 years that I’ve been with them. Just fantastic, couldn’t be any better. Joe and that whole group has just been amazing. But you know, there’s things that are different. I do have a race team. You know, I really would like, even if I phased out and ran some there, that would be a cool goal of mine.”

Joe Gibbs made his delight clear in his statement regarding Hamlin’s new contract. The team owner said: “I really appreciate Denny and everything he has meant to our organization. It is just really special when you think about everything we’ve experienced over the past 20 years, from that first moment when J.D. [Gibbs] recognized his talent at a test session, until now.

“It is remarkable in any sport to compete at the level Denny has for this long and we are thrilled he has been able to spend his entire career with us.”

Hamlin and JGR return to action on Sunday, when Indianapolis Motor Speedway will host the Brickyard 400, with the 58-time race winner chasing a fifth victory of a stellar season.