DAYTONA BEACH, Fla. — Denny Hamlin edged his teammates Kyle Busch and Erik Jones to reach the checkered flag first in a destruction-derby-style overtime finish of the 61st Daytona 500, the crown jewel of Nascar’s Monster Energy Cup Series.

Three multicar wrecks in the final 25 miles scrambled the order and ended the hopes of more than half of the 40-car field. But through it all, Hamlin, 38, maintained his spot near the head of the lineup.

On the final restart, Hamlin, a native of Tampa, Fla., sprinted away to gain a two-lengths lead ahead of the pack and then held on as Busch, Jones, Joey Logano and Michael McDowell tried in vain to catch him.

The dash to the finish featuring the three teammates for Joe Gibbs Racing was an especially emotional one for the team, as the co-founder J. D. Gibbs died at 49 in January after a long illness. It was the Gibbs team’s 100th victory for Toyota since they joined forces in 2008.