Regan Smith prevailed in a spectacular, wreck-strewn three-way finish to win Saturday’s Aaron’s 312 NASCAR Nationwide Series race at Talladega Superspeedway.

The race was shortened from 117 to 110 laps because of the onset of darkness.

Kasey Kahne out-dragged Smith and Joey Logano at the start-finish line, but NASCAR ruled Smith was ahead for a caution as the field wadded up behind them. Kahne took second, making it a JR Motorsports 1-2, with Logano third, according to the preliminary scoring. Kurt Busch and Justin Allgaier completed the top five.

Smith went from seventh to first on the last lap to win, using a big push from Kahne to get there. “Pretty cool isn’t it?” said Smith. “… I’ve got give a big thanks to Kasey. Without him, we don’t win the race.”

With the victory, Smith took over the NASCAR Nationwide Series points lead, the first time that any JR Motorsports drivers has ever led the standings. It was his second career victory in 111 starts in the series.

Kahne, the second-place finisher, almost had it and was surprised the race ended under yellow.

“I’m happy for Regan and the JR Motorsports guys … but I’m really surprised they threw the caution,” Kahne said. “So many times they wouldn’t.”

As expected, there were numerous accidents at the 2.66-mile superspeedway and a fair amount of controversy, too.

Rookie Travis Pastrana started from the pole in his Roush Fenway Racing Ford, flanked by Austin Dillon in a Richard Childress Racing Chevrolet.

Dillon fell back in the opening laps with engine troubles, while Danica Patrick brought out the first caution on Lap 14, when she got hooked and turned accidentally by her teammate Kyle Larson, with Patrick’s car spinning helplessly into the infield. Under caution, both Dillon and Patrick lost a lap for repairs, but Patrick parked it shortly thereafter.

“He’s a great driver,” said Patrick of Larson. “He’s going to be fine, but that was probably a little bit of inexperience.”

As the race hit the 50-lap mark, Logano led Kahne, Elliott Sadler, Brian Vickers and Smith.

Pastrana’s run came to an end shortly before Lap 75. Then, Brian Scott turned Reed Sorenson on the backstretch. Pastrana tried to avoid Sorenson but instead hit him and lifted his rear wheels off the ground, both cars ending up lodged in the mud on the inside of Turn 3.

“I just get an award for being stupid … all of a sudden we’re up there racing like a bunch of fools up front,” said Pastrana. “… Just devastated for the team.”

Then, chaos.

On Lap 92, Sam Hornish Jr. was entering Turn 3 when he got forced down by Johanna Long and hit Eric McClure. Car after car piled up behind them, with several getting stuck in the soft grass. It was a classic Talladega Big One.

The restart came with 7 laps to go, with Smith and Kahne going to the front, but then Kurt Busch, Dillon and Parker Kligerman all taking turns on point.

With three laps to go, Joey Coulter got turned by Justin Allgaier on the frontstretch, going into the wall and setting up a green-white-checkered finish.

Dillon led at the final restart and held it over Kligerman at the white flag. On the backstretch, Busch took the lead briefly, but Smith went to the front and held it as the caution came out for a big wreck behind them.

Tom Jensen is the Editor in Chief of SPEED.com, Senior NASCAR Editor at RACER and a contributing Editor for TruckSeries.com. You can follow him online at twitter.com/tomjensen100.