With Earnhardt, a five-time winner at Talladega, maneuvering behind him, McMurray thought he was a sitting duck. And then Austin Dillon, Earnhardt's drafting partner, suddenly lost control of his car and went sailing through the air.

When the caution flag flew on the final lap, McMurray knew he was home free.

"I don’t know how the last lap would have played out," McMurray said. "... I could see the 88 (Earnhardt) trying to set me up and figure out where he could get a run on me. When that caution came out, I was thinking ... I wanted it to end under green, but at the same time, I was like, ‘Throw a caution. I’m OK with that right now.’"

Jimmie Johnson, who dominated much of the race and led a race-high 47 laps, wound up 13th. Matt Kenseth, who led 32 laps, struggled with the handling of his car and wound up 20th, allowing Johnson to take the points lead in the Chase for the Sprint Cup.

With just four races remaining, Johnson, the five-time champion, leads Kenseth by four points. Busch and Kevin Harvick are tied for third, 26 points behind. Jeff Gordon is 36 points back in fifth.

Johnson and Kenseth took turns leading the race early and both stayed close to each other on the track. But Kenseth lost the handle on his car late in the race and could not get back to the front. Johnson faded during the final run and could only get back to 13th. But that was enough to make up a four-point deficit and take the points lead for the first time in the Chase.

“The outside lane got going and everybody jumped up in it and you just don’t know if people are going to chase the bottom or the top," Johnson said of the final 25-lap run to the checkered flag. "... I was on the bottom and worked my way to the middle and then everybody went single-file to the top and I dropped like a rock.

“It wasn’t the position I wanted to be in late in the race but we rallied back and got a few positions and got to finally get back in front of the 20."

Kenseth was baffled by his car's handling problems and dejected at finishing 20th in a critical race. He has won two of the six Chase races and led since the start of the 10-race playoff.

“It’s really bizarre. Handling is usually a non-issue here and I just got so loose I couldn’t handle it and I just had to hang out at the back for the last two runs, which was really disappointing," Kenseth said. "We finally got it fixed the last run but we only had 20 laps left. I really needed to be up there like we were early, feeling like we could control the race."

Johnson now seems to have the advantage in his quest to win a sixth Sprint Cup championship. The next race is at Martinsville Speedway, where he has won eight times, including the last race in April.

“I feel like the race going forward, you don’t have this big luck issue that can take place at plate tracks," Johnson said. "... I’m happy to have the points lead; we did a lot of work to get there. We will just go racing from here. That’s what I’m excited for — great racetracks and great racecars. It’s just going to be a dogfight until the end.”

Kenseth, meanwhile, is not giving up. He has seven wins this year and should have the edge at Texas and Homestead.

“I’ve got one of the greatest teams out here and I feel like we can race with anybody," Kenseth said. "Hopefully we’ll be at our best the next four weeks and we’ll give them a run for their money. It’s just an incredibly disappointing day.”

Kyle Busch held the lead after the last round of green-flag pit stops with about 25 laps to go, but McMurray worked his way to the front and took the lead with 15 laps to go.

“I knew that our car was good in practice, I just couldn’t get in the right line," said McMurray, who now has seven career victories, including two each at Daytona and Talladega. "To get in the right line requires a lot of risks. I feel like I was pretty patient all day."

Earnhardt led 38 laps and moved into second with 12 laps to go. He had Dillon, a Richard Childress Racing driver subbing for the injured Tony Stewart, behind him and the two had a plan for the final lap. They never got to execute it, however.

“We had formed our run and I thought we had a real head of steam off of two, and then they got together behind us and that was that," Earnhardt said. "I was going to try something down the back straightaway, I just never got the chance."

McMurray knew he was in trouble until he saw Dillon's car get airborne. Dillon lost control of his car in a tight draft with Stenhouse. While spinning, he got hit by Casey Mears, sending his car flying through the air.

“I don’t know how I was going to defend that," McMurray said of the Earnhardt-Dillon tandem.

When the caution flag flew, McMurray secured his seventh career victory and his second at Talladega.

"We finished second to a pretty good racecar driver on the plate tracks," Earnhardt said. "Jamie wins a lot of races here and at Daytona. He runs well here and he’s got Hendrick power, and it’s hard to outrun that."

McMurray was emotional in victory lane as he hugged his 2-year-old son Carter.

“I told (my wife), it would be so cool to have your kid in victory lane. That’s so awesome," he said.

The race was fairly tame — by Talladega standards — until the final green-flag pit stops with 25 laps remaining. That’s when the drivers got busy, dicing and jockeying for position and swapping the lead three-wide.

The first 77 laps were fairly uneventful, with Kenseth, Johnson and Earnhardt Jr. swapping the lead while Chase contender Kevin Harvick hung around the back.

The first wreck occurred on Lap 78 when Marcos Ambrose lost control of his car while running in the outside lane, spun across the track and slammed into the car of Juan Pablo Montoya. Surprisingly, they were the only two drivers involved in the crash.

The incident allowed Kyle Busch to get back onto the lead lap. He had fallen a lap down when he got blocked on pit road and missed his pit stall, forcing him to pit twice.

Danica Patrick was in contention to win, running in the top 10 much of the race, until she was nabbed for speeding on her final pit stop. Patrick hit pit road too hot and then swerved on pit road, prompting Kenseth to call her a “derelict.”