It had been nearly two full years since Kevin Harvick was in Victory Lane, but on Sunday he snapped the cold streak and won the FireKeepers Casino 400 at Michigan International Speedway.

Harvick, who drove the red Busch Light Apple No. 4 Ford for Stewart-Haas Racing, outpaced pole-sitter Bubba Wallace by about three seconds for the win. He caught a break with about five laps to go after race officials decided not to wave a caution flag when Daniel Suarez blew a tire.

Wallace finished in second, followed by Denny Hamlin, Joey Logano and Ryan Blaney.

CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM

Kevin Harvick greets fans in Michigan

Kevin Harvick, driver of the Busch Light Apple No. 4 Ford, greets fans during driver intros prior to the NASCAR Cup Series FireKeepers Casino 400 at Michigan International Speedway, Aug. 7, 2022, in Brooklyn, Michigan. (Sean Gardner/Getty Images)

Harvick entered the race 10th in the points standings and 17th in the projected playoff standings. He had five top 5s and 11 top 10s before taking the victory lap in front of the fans.

"Everyone who doubted us, doesn’t know us. They obviously know we thrive in these types of situations. A lot of things went our way today, which we hadn’t had all year long," Harvick said, adding the biggest thing for him was to take advantage of the pits and restarts.

Christopher Bell picked up a victory in Stage 1 but later had to pit after brief contact with the wall. Hamlin finished second in Stage 1 but won Stage 2. But in the end, it was Harvick coming out on top.

Kevin Harvick races Tyler Reddick

Kevin Harvick (4), Tyler Reddick (8) and Kyle Larson (5) race at Michigan International Speedway in Brooklyn, Michigan, Aug. 7, 2022. (AP Photo/Paul Sancya)

MALL OF AMERICA SHOOTING: KYLE BUSCH'S WIFE SAYS FAMILY IS SAFE AFTER FLEEING

There were 15 lead changes in the race with 10 different leaders.

It had been 65 races since Harvick’s last win, which came at the Bass Pro Shops/NRA Night Race at Bristol back on Sept. 19, 2020. He held off Kyle Busch in that one.

Bubba Wallace races with Christopher Bell

Bubba Wallace (23) races Joey Logano (yellow) and Christopher Bell (20) in the race at Michigan International Speedway in Brooklyn, Michigan, Aug. 7, 2022. (AP Photo/Paul Sancya)

Denny Hamlin and Joey Logano jockey for position

Denny Hamlin (11) and Joey Logano (22) race in the FireKeepers Casino 400 at Michigan International Speedway in Brooklyn, Michigan, Aug. 7, 2022. (AP Photo/Paul Sancya)

He won nine times that year but ended up finishing fifth for the championship.

With the win at Michigan, Harvick is now in the NASCAR playoffs with a few races left.

CLICK HERE TO GET THE FOX NEWS APP

The Federated Auto Parts 400 at Richmond Raceway in Virginia is set for next week.