– Denny Hamlin was one of the last drivers standing at the end of the messiest and longest race in Talladega Superspeedway history.

The Daytona 500 winner surged to the win with a sweeping three-wide pass — the 58th lead change of the race — coming out of the final turn of the third overtime Sunday. The race went nearly 32 miles, or 12 laps, longer than scheduled because of a record 13 cautions that collected nearly every playoff contender.

The crowd of 15,000 — the most allowed to attend the Alabama superspeedway — booed Hamlin as he was declared the winner. 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.

The reigning Cup champion 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 his older brother, Kurt, went airborne over Cole Custer. That accident brought out the first of two red-flag stoppages.

Hamlin earned the automatic berth into the next round of the playoffs, joining Kurt Busch, winner last week at home track Las Vegas but one of six playoff drivers who failed to reach the finish.

An hour after the finish, NASCAR rescinded a penalty on Chase Elliott, which moved him up to fifth in the final running order — the highest of the playoff drivers behind Hamlin. Austin Dillon was the next highest-finishing playoff driver at 12th.

Four of 12 drivers will be eliminated next week at The Roval at Charlotte Motor Speedway. The bottom four in the standings are Kyle BuschClint BowyerAric Almirola and Dillon.