TALLADEGA, Ala.—Jamie McMurray won at Talladega Superspeedway in a nearly clean race until rookie Austin Dillon lost control on the final lap Sunday, allowing the winner to coast across the line under caution.

McMurray won for the first time in the NASCAR Sprint Cup Series since 2010, not having to worry about a charge from Dale Earnhardt Jr. because Dillon spun coming out of the second turn. The only other driver collected in the crash was Casey Mears, who slammed into Dillon's car and sent it flying into the air before it came back down upright.

A race known for massive crashes was essentially trouble free. There was a minor wreck early on when Marcos Ambrose got loose in front of the main grandstand and took out Juan Pablo Montoya, and 103 consecutive laps under green until the yellow and checkered flag waved together at the end.

“Every race here, we have a wreck on the last lap,” Earnhardt said. “For some reason, though, it was a lot calmer the last few laps. Everybody was pretty good about staying in line.”

Jimmie Johnson steered around trouble and finished 13th, emerging from the race with the lead in the Sprint Cup standings. The five-time Cup champion passed Matt Kenseth for the top spot and has a four-point edge with four races remaining.

Kenseth finished 20th. Busch and Kevin Harvick are tied for third, 26 points behind Johnson, with Jeff Gordon—who had hoped Talladega's unpredictable nature might help him make a big push—made up only two points and is 34 behind.

McMurray, who isn't part of the Chase, won for Earnhardt Ganassi Racing and took a phone call in victory lane from car owner Chip Ganassi, who was still in California celebrating Scott Dixon's championship in the IndyCar series the previous night.

Earnhardt, a huge fan favorite at Talladega, had hoped to make his move going down the back straightaway on the final lap.

He never got the chance.

“Our car was a rocket,” Earnhardt said. “I was moving around a little bit to see where I thought the 1 (McMurray) might be going. You've got to sort of fake him out. But I looked in the rearview mirror and I saw guys all over the place.

“I guess if we're in that situation next time,” he added, “we'll try to go a lap sooner.”