Updated

Talladega, AL (SportsNetwork.com) - Jamie McMurray ended a three-year winless streak in the Sprint Cup Series after holding off Dale Earnhardt Jr. in the closing laps of Sunday's Camping World RV Sales 500 at Talladega Superspeedway.

In a relatively clean 500-mile race at Talladega, the field ran in single-file for the final 10 laps. Earnhardt was setting up to overtake McMurray on the last lap around this 2.66-mile superspeedway before Austin Dillon and Casey Mears wrecked on the backstretch, ending the race under caution.

McMurray passed Kyle Busch for the lead with 15 laps to go and then held it for the remainder of the event. McMurray claimed his seventh career Sprint Cup victory but his first since October 2010 at Charlotte, ending his 108-race winless drought. McMurray won at Talladega in the fall of 2009, his last season with Roush Fenway Racing before moving over to Earnhardt Ganassi Racing.

"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 figuring out where he could get a run on me. I saw the caution come out behind me. I honestly wanted it to end under green, but at the same time having the caution, I'm okay with it."

Dillon, who is the current points leader in the Nationwide Series, ran in third on the final lap before he lost control and spun out. Mears then hit Dillon from behind, sending him airborne. His car flipped around before it landed upright on the track. Neither driver was injured during the incident.

"That was a lot of fun right there coming to the white flag at Talladega and having a shot to win," said Dillon, who substituted for the injured Tony Stewart in this race. "I was going to push (Earnhardt) Junior right there. He had a pretty good car. I was just trying to wait until the end, and they made a move, and I tried to block. It didn't work out."

Earnhardt finished second after he was attempting to win at Talladega for the first time in nine years. He had a led a total of 38 laps.

"It's all kind of a blur as to how I ended up in second, but I had no reason to make a move before the last lap being in second place," Earnhardt said. "I was in perfect position to be patient and wait as long as I wanted to, so that's why I didn't go any sooner than that. I just can't anticipate a caution coming out on the last lap every single time we run a Talladega race, so I just assumed it would go to checkered and was planning my move on the back straightaway."

Ricky Stenhouse Jr. scored his best finish during his Sprint Cup rookie season with a third-place run. Stenhouse was right behind Dillon before his crash.

"I had a good run coming, but when I pulled out a little bit there to go to the bottom, (Dillon) pulled down to block, and I tried to get back to the top as quick as I could, thinking the momentum was going to carry us around the outside there," Stenhouse said. "We just met right there in the middle."

Jimmie Johnson's 13th-place finish coupled with a 20th-place run for Matt Kenseth allowed Johnson to grab a four-point lead over Kenseth. There are four races remaining. The series heads to Martinsville next weekend, where Johnson won in the spring.

"I'm happy to have the points lead," Johnson said. "It took a lot of work to get there. We're just getting one point at a time. We got a few more today."

In a race that featured 52 lead changes among 20 drivers, Johnson ran in front the most with 47 laps. But the five-time series champion got shuffled back in the pack during the late stages and could not recover, costing him an opportunity to win his third restrictor-place event this season. Johnson scored a season-sweep at Daytona this year.

"I was on the bottom lane and then worked my way to the middle lane, and I was able to maintain it for a while, but everybody went single file to the top, and I dropped like a rock," he said. "It wasn't a comfortable feeling, and it wasn't the position I wanted to be in late in the race. But we rallied back and got a few more spots. Most importantly, we got back in front of the 20 (Kenseth)."

Kenseth led 32 laps early in the race but later experienced an ill-handling car. He won last year's Chase event at Talladega and then led the most laps with 142 here in the spring.

"Typically, handling is not an issue here, but I just got so loose that I couldn't even hang on to it," Kenseth said. "I pretty much had to run in the back, which was disappointing. We finally got it fixed during that last run but only had 20 laps to get back up there. I really needed to be up there like we were earlier when I felt like I was controlling the race more."

Paul Menard finished fourth, while Busch took the fifth spot after rebounding from a one-lap deficit earlier in the race due to a pit-road mishap.

David Ragan, who won at Talladega in May, David Gilliland, Martin Truex Jr., Ryan Newman and Clint Bowyer completed the top-10.

Busch moved up to third in the Chase standings, as he trails Johnson by 26 points. Kevin Harvick is also 26 points behind after finishing 12th. Earnhardt climbed from ninth to sixth in the rankings (-52).

This race featured no major crashes, unlike recent events held here. Marcos Ambrose and Juan Pablo Montoya, who is McMurray's teammate at Earnhardt Ganassi Racing, were involved in a wreck on lap 80.