Updated

In one of the bigger upsets in NASCAR history, it wasn't only one David but two of them who beat Goliath on Sunday at Talladega Superspeedway.

David Ragan avoided two major wrecks -- one before a lengthy rain delay and the other in the closing laps -- and then received pushing help from his Front Row Motorsports teammate, David Gilliland, to take the lead on the final lap and grab a victory in the Aaron's 499.

Ragan and Gilliland drafted through the field during the last lap before Ragan pulled in front of Carl Edwards, the pole sitter, for the lead between turns 3 and 4. Ragan then beat Gilliland to the finish line by 0.212 seconds for his second career Sprint Cup Series victory.

It was the maiden win for Front Row Motorsports, an underfunded three-car team in the Sprint Cup Series. Josh Wise, a Nationwide Series regular, also drives for Bob Jenkins' racing organization.

"I'm kind of a low-key guy," said Ragan, who led just four laps. "I don't know what to say. This is a true David vs. Goliath moment here. They're not all this easy. This is so special to get Front Row Motorsports their first win. It feels like I've never been here before."

It's the sixth time in the past seven Sprint Cup races at Talladega that the winner grabbed the lead on the final lap.

Ragan's first victory in the series came in July 2011 at Daytona International Speedway (64 races ago) when he drove for Roush Fenway Racing. Daytona is the sister track to Talladega.

"You win one and you don't want to be that guy that just wins one," he said. "You want to win two and three."

Gilliland has yet to score a victory in NASCAR's premier series.

"It's been my dream since I came to Front Row to get Bob Jenkins to victory lane," Gilliland said. "This was about as much as I could help today. I'm very proud of our whole Front Row Motorsports team. What a great day for them. An underfunded team coming here and finishing one and two is awesome. I'm very proud of David Ragan. He would have done the same for me."

The first big crash of the day occurred on lap 42 when Kyle Busch nudged Kasey Kahne from behind and put him into the turn 1 wall, triggering a 16-car pileup.

"I know I got into the back of the 5 (Kahne), and I guess I was trying to go to the outside of him, but he just moved up in front of me, and I wasn't expecting it," Busch said. "Before I could go to the outside, I got into the back of him. I just hate that I caused a melee like that."

No drivers were injured during the accident, but Kahne said he had the wind knocked out of him after making contact with wall.

"I was trying to stay behind (Hendrick Motorsports teammate) Jimmie (Johnson), and I had a ton of momentum and just had to basically go to his right so I could get in front of the 18 (Busch)," Kahne said. "I was just going for it, but everybody was shoving, and you really can't hit from behind with these cars. I got hit a little bit and went to the right."

The race ran incident-free from there until lap 124 when rain began falling on this 2.66-mile superspeedway. Edwards had pulled a half-car length ahead of his Roush Fenway teammate, Ricky Stenhouse Jr., for the lead when the caution flag came out. NASCAR stopped the race on the following lap when the rain intensified. It did not resume until 3 hours and 36 minutes later.

With just a handful of laps remaining and darkness approaching, "the big one" happened on the backstretch, involving 12 cars. Stenhouse had squeezed to the outside of J.J. Yeley but bumped into him while trying to avoid hitting the wall. Yeley spun down the track and collected Kurt Busch, who's car rolled over once on the track before it landed on the front end of Ryan Newman's vehicle. There were no injuries.

"I just got hit from behind, and along for the ride I went," Busch said.

Newman has had a history of being caught up in several big wrecks at Talladega in the past, including a few that have occurred in the closing laps. He criticized NASCAR for resuming the race after the rain delay.

"That's no way to end a race," Newman said. "That's just poor judgment in restarting the race, poor judgment. I mean, you got what you wanted, but poor judgment and running in the dark and running in the rain."

Danica Patrick was also involved in that crash, as she made contact with the wall. Patrick finished 33rd in her first Sprint Cup race at Talladega. She avoided being caught up in the earlier wreck while running in the top-10 at the time.

The fifth caution set up a one-attempt only green-white-checkered finish due to limited daylight.

Matt Kenseth had been dominant throughout the race, leading 142 of 192 laps. Kenseth was in front for the final restart, but his former teammate, Edwards, moved ahead of him to take the lead heading into the final lap. He fell back in the pack to finish eighth.

"It was a really disappointing finish," Kenseth said. "Congratulations to David and David there. That was cool to see the underdogs go up there and grab one, so I'm happy for those guys."

Edwards crossed the line in third, while Michael Waltrip and Jimmie Johnson, who won the first restrictor-plate race of the season, the Feb. 24 Daytona 500, rounded out the top-five.

Denny Hamlin competed in his first race since he suffered a compression fracture in his lower back during an accident six weeks ago at Auto Club Speedway in Fontana, Calif.

Hamlin ran the first 23 laps under green before the first caution came for fluid dropped on the track from Trevor Bayne's blown engine. Hamlin pitted during the caution period and made the exchange with his relief driver, Brian Vickers, in the No. 11 Joe Gibbs Racing Toyota.

Vickers drove the car up into the top-10 before he was involved in the lap 42 crash. He returned to the track after spending more than 40 laps in the garage for repairs. Hamlin was credited with a 34th-place finish.

"I felt good," Hamlin said after he climbed out of the car. "Every week, I feel a lot better, and this is the best I've felt physically. Gosh, it's probably been months since I felt this good. I'm definitely looking forward to going back to full competition next week."

Hamlin plans to run the full 500-mile distance in next Saturday night's race at Darlington Raceway.