Denny Hamlin was coasting along at or near the front in the second half of the Kobalt Tools 500 Sunday at Phoenix International Raceway, and all indications were that he would roll into next week’s season finale at Homestead, FL with a big point lead.

Instead, Hamlin, who led 190 laps and clearly had one of the day’s two best cars, fell victim to a long green-flag run leading to race’s end and watched a fuel-mileage competition drop him to 12th at the finish.

Now, instead of carrying a nice cushion of a lead into Homestead, Hamlin finds himself only 15 points ahead of second-place Jimmie Johnson and 46 ahead of third-place Kevin Harvick. Johnson finished fifth Sunday and gained 18 points on Hamlin, and Harvick came home sixth, gaining 13 points.

Hamlin was in deep despair after the tide took a dramatic turn and slapped him in the face in the closing laps. He slammed his right fist into the car’s dashboard on the cooldown lap and, after exiting the car, threw a water bottle in frustration.

About the only positive result from the day was that Hamlin, indeed, led the most laps and won the five bonus points that go with that accomplishment. Those five points could be critical next week as the top three drivers prepare for what should be a barnburner at Homestead.

“It’s pretty disappointing,” Hamlin understated. “We were in a good position there to look pretty good going into next week. Now we’ve got to outrace them next week.”

Hamlin and his team did everything right Sunday except for dealing with what was an unusual scenario – an extended green-flag run to the finish. Typically, Phoenix races feature cautions late in the going.

That did not happen Sunday, however, and, as teams juggled the choices of pitting or risking stretching fuel to the end, Hamlin decide to drop off the track for gas with 14 laps to go while running second to Carl Edwards, the eventual race winner.

Harvick had been forced to the pits earlier because of a loose lugnut, a mistake that actually resulted in a positive for the Chevrolet driver. He got new tires and fuel later than the other leading drivers and had no problem finishing the race without entering pit road again.

Johnson, the other championship contender, dropped into extreme fuel-saving mode over the closing miles and finished the race with fuel pressure bobbling.

Hamlin, of course, is not the first driver with a dominant car to lose a race because of a fuel-mileage run, but the circumstances – he lost what would have been a big point lead entering the season’s final race – were exceptionally harsh.

“You need good cars and all that,” he said. “We had all that today, and things didn’t work out strategy-wise. We did what we had to do today but didn’t have it there at the end.

“It’s frustrating. But I’m proud of these guys. We had a car that could win. I was sitting pretty.”

Mike Hembree is NASCAR Editor for SPEED.com and has been covering motorsports for 28 years. He has written several books on NASCAR, including "NASCAR: The Definitive History of America's Sport" and "Then Tony Said To Junior: The Best NASCAR Stories Ever Told". He is a six-time winner of the National Motorsports Press Association Writer of the Year Award.