After the two made contact coming out of the final turn, Harvick finished 0.210 seconds ahead for his 46th series victory and first since November at Texas.
Driving a backup car after wrecking during a practice lap Friday, Hamlin led 113 laps, but couldn’t catch Harvick after pitting on a caution after Kyle Larson blew a tire on the 265th lap.
The 43-year-old Harvick led the final 41 laps in the No. 4 Stewart-Haas Racing Ford for his second straight victory at the track. He has four victories at the mile oval to tie the record set by Jeff Burton.
Harvick won at New Hampshire last year after a late bump from behind knocked Kyle Busch off the lead. On Sunday, Harvick had a late bump again, but this time it was nudging Hamlin just enough to the side coming out of the final turn.
“I’m like, ‘You’re not getting under me again.’ And he drove to the outside of me, and I waited until he got near me, and I just put a wheel on him,” Harvick said.
Joey Logano was ninth. He has a three-point lead over Kyle Busch in the point standings. Busch, who won the first stage Sunday after qualifying second, finished eighth.
NASCAR paid tribute to crew chief Nick Harrison, who died overnight after Saturday’s Xfinity Series race.
NASCAR announced Harrison’s death during the drivers’ meeting before the race Sunday and honored him with a moment of silence. No details were given.
The Associated Press contributed to this report.