Kevin Harvick survived a late bump and run attempt by Denny Hamlin to score his first Monster Energy NASCAR Cup Series win of the season it the Foxwoods Resort Casino 301 at the New Hampshire Motor Speedway.

The win came on the heels of a pit road gamble as Harvick stayed on track while most drivers on the lead lap pitted under a late yellow.

The 43-year-old from Bakersfield, California started the race’s final 150 lap stage in second place behind Hamlin and ahead of Kurt Busch, Brad Keselowski and Alex Bowman.

Hamlin jumped Harvick on the restart and stretched out to a hearty 1.7 second lead over Harvick over the next 25 laps while Kurt Busch held onto third ahead of Keselowski and Hamlin’s Joe Gibbs Racing teammate Eric Jones.

The lead see-sawed over the next 25 laps before the action was slowed on lap 213 for Kyle Busch’s contact with the Turn 1 wall.

The yellow brought the field down pit road for their final scheduled stop. Hamlin won the race off pit road ahead of Jones, Kurt Busch, Keselowski, Jones with Harvick losing three spots and falling to fifth ahead of the lap 219 restart.

Kyle Larson then spun further in the pack and slowed the action once again.

Hamlin motored ahead on the restart while Team Penske’s Ryan Blaney muscled his way to second place.

The reigning Daytona 500 winner picked up from where he left off before and moved out to 2.5 second lead over Blaney as the race reached the 50 to go mark.

His blistering pace came to a halt again when Kyle Larson crashed in Turns 1 and 2. Hamlin elected to pit, and many of the lead lap cars followed. Harvick’s crew opted for the opposite strategy and stayed on track to obtain some valuable track position.

Hamlin came back on track in fourth and restarted behind two of his Joe Gibbs Racing teammates Erik Jones and Martin Truex, Jr, who elected not to pit.

Harvick gapped the Toyotas on the restart while Hamlin thrusted his way up to second place. He stalked Harvick for the next 29 laps as the pair worked through lapped traffic.

Hamlin made the most of his best chance at the white flag when he gave Harvick a bump heading into Turn 1. That pushed Harvick up the track but didn’t slow his momentum, and he regained the lead on the backstretch.

Harvick dove low in Turns 3 and 4 while Hamlin took the high line and the pair made slight contact which slowed Hamlin down and secured the win for Harvick.

The 2014 series champion owed the win to the call to by crew chief Rodney Childers stay out under the final yellow.

“I didn’t think we had the best chance to win today, but Rodney made a great call,” said Harvick. “We had a good car (Sunday). We just never could get track position. We stayed out there and ran a lot of good laps.”

While the call put him in position to win, lapped traffic nearly cost him a shot at it. Harvick admitted that he deliberately took defensive maneuvers to keep Hamlin at bay.

“I really didn’t want to see that traffic there at the end,” Harvick said. “It made my car tight when (Hamlin) got to me. He tried to move me out of the way down there and I knew that was coming, as close as he was. So I just stood on the brakes — half-throttle down the back straightaway.

“I was like, ‘You’re not getting under me again,’ and he drove to the outside of me and I waited until he got to the outside of me and put a wheel on him.”

Hamlin took second ahead of teammate Erik Jones who claimed his fifth third place finish of the season. Ryan Blaney took home fourth ahead of Matt DiBenedetto, who scored his second top-five of the year.

Truex, Jr faded to sixth while Ryan Newman claimed his fifth top ten in the last six races by finishing seventh.

Kyle Busch recovered from his earlier accident to finish eighth while the Team Penske fords of Joey Logano and Brad Keselowski rounded out the top ten.