Denny Hamlin passed teammate Matt Kenseth on lap 473 and held off a hard-charging Brad Keselowski to win the STP 500 at Martinsville Speedway, claiming his 25th career NASCAR Sprint Cup Series victory.

For Hamlin, the victory was a sweet conclusion to a tumultuous week for Hamlin and Joe Gibbs Racing. The team announced that Joe Gibbs Racing president J.D Gibbs would undergo treatments for symptoms impacting brain function.

Hamlin thanked the younger Gibbs multiple times after the race, explaining that J.D. discovering him was critical to the rise of his career.

“This is a very significant week because of the news we shared about J.D.,” said Hamlin. “It was about 12 or 13 years ago when J.D. happened to show up at a Hickory test where we happened to be running some late models.”

“They signed me up, and J.D. was the key to making that happen. I got propelled to the Cup series in just one year, from late models to the Cup series in one year. I thank my lucky stars that I was able to get in the car I was able to get into.”

“These guys gave me my chance, and J.D. was a big part of that.”

It was also fitting that the victory came at Martinsville, home of one of the premier events in Late Model Stock Car Racing. Hamlin never won the ValleyStar Credit Union 300 during his time in Late Models, but it was his time in those ranks that left him longing for Martinsville’s signature Grandfather Clock.

“I was thinking, ‘How awesome would it be to win at Martinsville,'” said Hamlin. “I came close in Late Models, but I never did.”

“The success that I’ve had at this race track comes from watching guys like Bugs Hairfield, Roy Hendrick, Ray Hendrick, Eddie Johnson and those guys that I idolized growing up racing Late Models and showed me the way to short track racing. This win is for guys like that.”

The Chesterfield, Virginia native’s win on a home track moved him into a historic spot among natives of the Commonwealth. Hamlin tied NASCAR Hall of Famer Joe Weatherly for the most wins in NASCAR’s premier division for a Virginia native.

Hamlin started in the 15th position, but quickly worked his way through the field, taking the lead for the first time on lap 148.

He relinquished the lead during a lap 164 caution period when his team incurred an uncontrolled tire penalty, but again Hamlin battled his way to the front. He reclaimed the lead on lap 316 and was a contender for the rest of the race.

Tony Stewart and Cole Whitt stayed out during the 16th and final caution period on lap 461, created by debris on the frontstretch. However, they were quickly dispatched by Kenseth and Hamlin. Hamlin was able to duck underneath his Joe Gibbs Racing teammate with 28 laps remaining to make the decisive pass for the lead.

Keselowski was pleased with his second-place finish, although it did mean a shot at Martinsville glory slipped away.

“That’s the best we’ve ever been here at Martinsville, so I’m pumped about that,” said the 2012 Sprint Cup Series Champion. “But I’m a little disappointed I’m not taking home a clock.”

Keselowski was able to reach Hamlin’s bumper and made contact several times, but elected not to dump the driver of the #11 FedEx Express Toyota for the victory.

“I did everything I could other than wreck him,” said Keselowski. “I really don’t know what more I could have done other than just drove through him, but I felt pretty good about what I did do.”

What will Hamlin do with this clock, the fifth he has won since joining the Sprint Cup ranks?

“I’ve got to track down where the rest of them are,” Hamlin confessed. “It’s [daughter] Taylor’s first clock, so it will probably go in her room.”