CONCORD, N.C. -- Dale Earnhardt Jr. was out front on the final lap for the first time in 105 races, and the only thing standing in the way of a victory was the gas, or lack of it, in his tank.
The crowd roared as he took the white flag, the fans stomping in the stands in near hysteria over the almost certain ending of Earnhardt's nearly three-year losing streak.
In a blink of an eye, it was over.
The gas tank in his Chevrolet ran dry along the backstretch at Charlotte Motor Speedway, and as Earnhardt tried to coast his way through the final turn, Kevin Harvick zipped past him to steal the Coca-Cola 600.
It was a heartbreaking end for the victory-starved JR Nation, and somewhat mimicked the final lap of the Indianapolis 500.
Earlier Sunday, rookie JR Hildebrand crashed coming out of the final turn to lose the Indianapolis 500. Both Earnhardt and Hildebrand are sponsored by the National Guard, and the sudden turns in the two big races spoiled what would have been a celebratory Memorial Day for the military, which makes sponsorship of auto racing its top marketing tool.
"We almost won this race," Earnhardt said. Broadcast from the garage on Charlotte's 200-foot wide big screen, the crowd erupted in cheers for NASCAR's most popular driver.
He settled for seventh, and his last win was at Michigan in 2008. It's the second time this year he's lost to Harvick, who has led just nine laps in his Sprint Cup Series-best three victories.
Harvick passed Earnhardt for the lead in the closing laps at Martinsville, and has taken no joy in beating him either time.
"I think everybody sitting up here would say we want the 88 to win and they're so close to winning and both times they had a chance to win," Harvick said. "We are going to do what we have to do to win the races, and today it all just worked out strategy wise that we won the race.
"But I feel so stinking bad for him, and I know how bad he wants it. It'll happen."
Earnhardt was comfortably out front in the closing laps of NASCAR's longest race of the year. Earnhardt knew stretching his gas to the finish was going to be tough, but crew chief Steve Letarte ordered him to go for broke.
It capped a frantic few minutes of strategy as nearly five hours of racing came down to fuel mileage and a final two-lap sprint to the finish.
The crew chief begged Earnhardt to not worry about gas and chase down Greg Biffle and Kasey Kahne over the final 20 laps. But Letarte reversed course when Kahne closed in on Biffle, and Matt Kenseth, who was running fourth, stopped for gas.
Figuring Biffle and Kahne would run out racing each other for the win, he urged Earnhardt to sit tight and try to exploit their misfortune. It might have worked, too, if Hendrick Motorsports teammate Jimmie Johnson's engine didn't fail four laps from the finish.
Biffle had to stop for gas under caution, and Kahne and Earnhardt lined up side-by-side for the final restart.
Earnhardt, on the bottom, got a great jump as Kahne got hit from behind by Brad Keselowski. It caused cars to stack up in the middle of the pack, and debris was strewn everywhere. But the caution call from NASCAR never came.
Earnhardt got to the white flag just fine. But because the yellow never waved, he had to race and couldn't make it to the finish.
Earnhardt ran out on the back straightaway and coasted through the final turn until Harvick passed him.
"The spotter was like, 'Man, they're coming! They're coming!' I was like, 'I'm cruising. What am I supposed to do, get out and pedal this thing with my feet?" Earnhardt said.
Harvick had a similar reaction.
"The spotter was going nuts, "The 88's out of gas! Keep going!" Harvick said. "I'm like 'Well, I'm not going to let off!' What do you want me to do? I'm going as hard as I can go. All of a sudden, he just shut off. He had sucked every drop out of it."
Meanwhile, David Ragan finished second in a Ford behind the Chevrolet of Harvick. Joey Logano was third in third in a Toyota, and Kurt Busch was fourth in a Dodge. AJ Allmendinger and Marcos Ambrose were fifth in sixth in Fords for Richard Petty Motorsports.
The finishing order wasn't really indicative of how drivers managed the 600-mile race.
Biffle and Kenseth probably had the best cars, but Biffle would up 13th and Kenseth was 14th because of the fuel issues. Kahne, who came back from a pit road speeding penalty to have a shot at the win, wound up 22nd.
Kyle Busch led 55 laps, but had two late spins and finished 32nd.
It was so topsy-turvy, it opened the door for drivers who struggled mightily most of the race, and that included Hamlin, who changed his carburetor late in the race to drop from fourth to 27th with 99 laps to go.
"My eyes got huge when I saw everyone was running out in front of us," Hamlin said.
Same for Harvick, who complained from the very first laps about the handling of his Chevrolet, some pit calls by crew chief Gil Martin and a debris caution from NASCAR that Harvick doubted was legitimate.
But he somehow worked his way toward the front, and put himself in position to steal the win 500 yards from the finish.
"We were lucky," Harvick said from Victory Lane. "It's nothing against the race track, I just don't like racing here. It just doesn't fit what I do. I griped and griped and griped all day long about how terrible it was. I just had a bad attitude."