WATKINS GLEN, New York — Denny Hamlin held off Brad Keselowski and Martin Truex Jr. on the final lap of the Cheez-It 355 NASCAR Sprint Cup Series race at Watkins Glen International on Sunday to claim his first career road course victory.

It was Hamlin’s second win of the 2016 season, his first since getting to Victory Lane in the season-opening Daytona 500 in February.

After taking the white flag in second, Truex got turned around after contact with Keselowski on the final lap and fell outside the top five at the finish. Joey Logano, instead, finished second, with Keselowski, A.J. Allmendinger and Tony Stewart rounding out the top five.

Hamlin went from third to first on a restart following a lap-76 beginning when he got by Kyle Busch and Keselowski and managed to maintain his lead through two additional restarts to get to the win.

Although the yellow flag waved only once in the first half of the 90-lap race, by the time the checkered flag had flown the yellow flag waved a total of eight times, with two of those leading to red flags for track clean-up after multi-car incidents. One of those incidents involved pole sitter Carl Edwards.

Edwards started on the pole and led the first 25 laps before making his first pit stop on lap 26 and handing the lead over to Logano. Logano looked to be on a two-stop strategy, waiting until lap 34 to make his first stop. The strategy hit a snag, though, when his first stop led to two when he was penalized for speeding on pit road.

Logano got back to the front and retook the lead, getting by Kurt Busch before the third caution of the race on lap 53. He gave up the lead to his Team Penske teammate, Keselowski, to pit during the yellow flag. After pitting during a caution on lap 49, Keselowski stayed out and remained on the race track for the remainder of the race.

NOTES: Sunday’s Cheez-It 355 was the first Sprint Cup Series race at Watkins Glen International since a repave. … Logano, who won the 2015 Cheez-It 355, also won after leading 67 laps of the 82-lap Zippo 200 NASCAR Xfinity Series race at Watkins Glen on Saturday. … Stewart is the all-time wins leader at Watkins Glen with five. … Stewart also was the winner when the Sprint Cup Series last visited a road course, winning at Sonoma (Calif.) Raceway in June. … Jeff Gordon is the Sprint Cup Series’ all-time road-course wins leader with nine. Stewart is just behind him with eight. … Gordon continues in his substitute role with Hendrick Motorsports, filling-in for Dale Earnhardt Jr. The Cheez-It 355 was Gordon’s 800th-career Sprint Cup race.