Denny Hamlin finally got a playoff win in a messy wreck-fest that took three overtimes Sunday, the longest race in Talladega Superspeedway history.

TALLADEGA, ALABAMA - OCTOBER 04: Denny Hamlin, driver of the #11 FedEx Express Toyota, celebrates in Victory Lane after winning the NASCAR Cup Series YellaWood 500 at Talladega Superspeedway on October 04, 2020 in Talladega, Alabama. (Photo by Chris Graythen/Getty Images)

Hamlin made the winning pass on the 200th lap — 12 more or nearly 32 miles longer than scheduled — with a three-wide sweep coming out of the fourth turn. The Daytona 500 winner had the throttle open on the No. 11 Toyota to nip Matt DiBenedetto and Erik Jones at the finish line.

Hamlin, a title favorite who has had a rough start through the first half of the playoffs, dipped below the out-of-bounds line to take the lead and NASCAR needed several minutes to determine if the move was illegal.

The crowd of 15,000 — the most allowed to attend the Alabama superspeedway — booed Hamlin as he was declared the winner. He was basically one of the last title contenders standing after 13 cautions, two more than the record, and he again denied blue-collar favorite DiBenedetto his first career victory.

DiBenedetto, who stood devastated on pit road after a second-place finish, was then dropped to 21st in the final finishing order. NASCAR penalized him for forcing William Byron below the line in the third overtime.

EXCLUSIVE INTERVIEW: KURT BUSCH SAYS CUP CARS WILL "COOK THE DIRT" AT BRISTOL

The race went more than four hours, so long that it was moved from NBC to NBC Sports Network because local news and then NFL football needed the big network. The brutality of the day was punctuated by Kyle Busch, who was at last given a merciful exit when he was collected in an accident during the second overtime.

Busch is still winless this season and on the verge of playoff elimination. He was involved in a dizzying number of incidents at Talladega, including a 13-car accident in which older brother, Kurt, went airborne over Cole Custer. That accident brought out the first of two red-flag stoppages.

CLICK HERE TO GET THE FOX NEWS APP