MARTINSVILLE, Va. (AP) _ Denny Hamlin was already feeling down on himself, his confidence waning in the face of a series of missed opportunities to win races.
Then came his latest here-we-go-again moment, a poorly timed pit stop.
And finally, his redemption as he overtook Jeff Burton on the 427th lap and went on to win the Goody's 500, a victory he said he hopes will be a turning point for him.
"When you get so close to winning so many races and something bad happens or things just don't work out in your favor at the end and you end up losing a win, it's tough to maintain confidence," Hamlin said Sunday after notching his fourth career victory.
"Your self-esteem starts going down. It takes a toll on you."
And there's nothing like a trip to Victory Lane to repair it.
Hamlin had twice finished in the top three on the smallest, tightest track in the series, and said he felt like bad luck had let several other wins slip away.
At Atlanta three weeks ago, he had just moved into second place when his power steering failed. In the next race at Bristol, a fuel pickup problem on the restart of a two-lap sprint to the finish cost him a chance to win, and he finished sixth.
Then came Sunday, when he gave up the lead and pitted for tires before the midpoint of the race, returned to the track in 19th position and knew he had to make amends.
"I didn't want to answer those questions at the end of the race," he said, "so I just went out and won it."
For 389 laps, the race looked like it would be another victory for Hendrick Motorsports at the track it has dominated, winning eight of the previous 10 races.
Hendrick drivers led 371 laps, but Hamlin and fellow Virginia native Jeff Burton made decisions under the next-to-last caution that allowed them to move up front. And Hamlin ruined Burton's decision to stay out while the rest of the leaders pitted.
"We timed it perfectly," Hamlin said. "We got to the front when it counted."
Jeff Gordon rallied to finish second, followed by Burton, Jimmie Johnson and Tony Stewart. Johnson had won three straight at Martinsville heading into the race.
Hamlin had a great view of the last one, finishing third, and had shown several times recently here that he was among the few that could run with the Hendrick teams.
The results just didn't show it. He arrived 15th in points, and now is eighth.
"It finally feels good to come here and get a win," said Hamlin, a native of Chester. "Can't wait, man. This is a sign of things to come, I believe."
Gordon, seeking his eighth victory at Martinsville, was satisfied.
"It came down to pit strategy, and Denny and those guys definitely did the right strategy," he said, believing Hamlin had taken two tires with 111 laps to go.
When Gordon headed for pit road on lap 389, Burton was running second and decided to stay out. Most of the front-runners also pitted, including Hamlin, but he just stopped for fuel while the rest took tires, allowing him to beat Gordon off pit road.
Hamlin made quick work of the cars between his and Burton's, pulling onto Burton's bumper with 75 laps to go. He moved inside to challenge for the lead on the next lap, then did it again with 73 laps to go, passing Burton to take the lead for good.
He won by 0.398 seconds.
Dale Earnhardt Jr. of Hendrick led a race-high 146 laps, but saw his winless streak stretch to 68 races. Johnson led 135 laps and Gordon, the pole-sitter, led 90 laps.
"Our car was unbelievable in the first half of the race," Gordon said. But after taking tires late, "the car just never took off," he said, until it was too late.
The race also went well for Jamie McMurray, who arrived 36th in points and having to race his way into the field. He did that, qualifying fifth, and then backed it up, running up front most of the day before finishing eighth. He's 30th in points.
Copyright 2008 The Associated Press.