MARTINSVILLE, Va.

- Denny Hamlin just needed a visit to Martinsville Speedway to get his racing team back on track.

Now, with his spot in NASCAR's Chase for the championship virtually assured, they can work to make it better.

Hamlin passed teammate Matt Kenseth for the lead with 28 laps to go yesterday and ended Toyota's 32-race winless streak in the NASCAR Sprint Cup race at Martinsville Speedway. It was his fifth victory on NASCAR's oldest, smallest circuit.

"We had a very fast car, but obviously some pit-road issues, but we overcame it," Hamlin said after his 25th career victory, which was helped along by a serious blunder that took four-time champion Jeff Gordon out of contention late.

Hamlin's pit crew, unlike Gordon, made their mistake early enough in the race to recover. Before the event was 200 laps old, Hamlin was penalized when his crew failed to control a tire on pit road. It dropped him from the lead to 22nd place.

He was back in the top 10 by the midpoint, and stalking the leaders shortly thereafter.

"The last 60, 70 laps played out how they needed to play out for us to win today," Hamlin said.

The race was run without reigning rookie of the year Kyle Larson, who watched from a North Carolina hospital where he was undergoing testing after fainting at an autograph session on Saturday. Regan Smith drove in his absence, finishing 16th.