Denny Hamlin, who led the most laps in the Daytona 500, led the ones that counted most Sunday, winning NASCAR's Subway Fresh Fit 500 at Phoenix International Raceway.

Hamlin mastered that track that bit him in November 2010, when he led 190 of 312 laps but was bitten by a fuel-mileage error that resulted in a 12th-place finish and crippled his run at the Sprint Cup championship.

Hamlin, who settled for fourth in the season opener at Daytona, had no such issues Sunday, holding off Kevin Harvick and Greg Biffle.

Jimmie Johnson and Brad Keselowski rounded out the top five.

Hamlin led the final 59 laps as all three Joe Gibbs Racing Toyotas finished in the top 10.

"We just kept working on it," said Hamlin, who took over the points lead from Matt Kenseth, who was 13th. "Every time we worked on it, it got better."

Johnson, 42nd at Daytona with a 25-point penalty and six-race suspension for crew chief Chad Knaus pending appeal, managed a fourth-place finish despite more travils.

Johnson appeared to have the fastest car until an issue with loose lug nuts and a vibration. He was planning to pit on lap 135 but caught a break when Paul Menard and A.J. Allmendinger tangled coming to the start-finish line.

Johnson took four tires and returned twice more to his pit stall under caution. Although he was able to remain on the lead lap he went from contending for the lead to 24th, forcing him to play catch-up throughout the second half of the race.

Harvick led 43 of the first 59 laps in a race that featured a Phoenix-record 15 race leaders but couldn't mount a final challenge while conserving gas in his No. 29 Chevrolet.

Martin Truex Jr. (seventh) elected not to pit under caution and assumed the lead on the restart with 79 laps to go. He had difficulty refueling, however, after David Reutimann brought out a caution on lap 247 and settled for seventh.

Other notable drivers had their share of trouble.

Clint Bowyer blew two right front tires in the first 25 laps. Kasey Kahne hit the wall early in the race. And Tony Stewart fell two laps down after being unable to start his fuel-injected Chevrolet during the Reutimann incident and wound up 22nd.

Carl Edwards, who started 24th and was a non-factor for much of the race, charged to sixth place with 65 laps left, but suffered right-fender damage in a brush with Ryan Newman and could not mount a challenge in the final laps. He ran out of gas in the final laps and finished 17th.