MONTREAL - Fortune smiled on Carl Edwards on the final lap of the NAPA Auto Parts 200 on Sunday.

The American was running second on the final lap of a caution-filled NASCAR Nationwide race when front-running Marcos Ambrose, who looked to be cruising to victory, hit a curb on the final turn to let it slip away.

That gave Edwards an unlikely win at 2.7-mile Circuit Gilles Villeneuve and helped him gain valuable ground on Kyle Busch in their two-man race for the Nationwide championship. It was his third win of the season and 23rd of his career in Nationwide, which is one step below the Sprint Cup series.

"I can't believe I caught him and I can't believe we won the race," said Edwards, now 192 points behind Busch, who finished 10th. "I guess that shows you can never give up."

The fans who packed the grandstands and any other spot with a view of the track roared as Andrew Ranger of Roxton Pond, Que., came in third and 1997 Formula One champion Jacques Villeneuve finished fourth at the track named after his late father. The relative unknown Jean-Francois Dumoulin of Trois-Rivieres, Que., was seventh.

The marathon race lasted nearly four hours, with 11 cautions and 31 laps run behind the pace car. Most of it was run on a dry track, but heavy rain fell briefly on the 56th of 76 laps, forcing a nearly seven minute delay to install rain tires, wipers and tail lights.

And the final laps had cars flying in all directions in one of the wildest days of Edwards' career.

"It was the most dynamic race I've ever been involved in," he said. "There was more happening in that race than any I've ever been a part of. I was never bored."

Ambrose led comfortably for most of the race, but with a desperate Edwards on his bumper on the final lap, the Australian hit the curb hard on the final turn and saw his car bounce off-line, allowing Edwards to cut inside and coast to the finish line.

"Carl put me under pressure," said Ambrose, who also wasted leads in the first two Nationwide events held in Montreal in 2007 and 2008. "He was in that blind spot, right rear. I braked as hard as I could, I couldn't make the turn and I bounced the curb.

"I'm starting to get annoyed with this track. That's three years in a row I gave it away."

Ambrose, who had won the only other road race on the Nationwide calendar at Watkins Glen three weeks ago, and Edwards had been teammates in a Rolex Grand-Am race on Saturday, only Edwards totalled their cars when he slip into a wall on a warm-up lap, so they never got to race.

Both were impressed with Ranger, who won the NASCAR Canadian Tire series in 2007 and who is leading it again this year.

The 22-year-old, considered a top talent since his late teens, had not finished better than 19th in his five previous Nationwide races, including 28th at Circuit Gilles Villeneuve last year.

"I had never heard of him - he's unreal," said Edwards, who shook Ranger's hand in the interview room after the race. "The first time I got by him I thought 'I never heard of him, he'll screw up.'

"I didn't know that he's a driving machine. It took all my talent to get by him."

Ranger took over second place on a re-start at the 70th lap, but the caution flag came out again a lap later. On the last re-start, Edwards edged past into second place, while Busch, who had been fourth, got caught up in a multi-car tangle on the ess-shaped Senna curve just after the start-finish line and dropped to 10th.

Villenueve jumped from eighth to fourth on the same play.

"It was long, but I was able to push from the start," said Ranger, who earlier Sunday came second to J.R. Fitzpatrick of Cambridge, Ont., in a Canadian Tire race. "I was impressed that I was able to battle with those guys.

"I think I proved I can be fast. If I caught the eye of some of the big teams, all the better. The car was really good and the team did a great job."

Villeneuve grabbed the lead early when those ahead of him went to the pits during caution, but then gave it back when racing resumed to make his own pits stop. He said poor pit strategy cost him.

"But the re-starts were amazing - I could attack," he said. "So every time there was a caution I was happy, although there's nothing that's not bent on the car."

Last year's winner Ron Fellows saw his race end on the 26th lap as Justin Allgaier crossed the grass on a turn and banged both the Toronto driver's Fastenal Chevy and Busch's Toyota. Fellows' car was smashed and he was forced to call it a day, as did Allgaier, but Busch was able to continue despite a 360-degree spin.

Patrick Carpentier of Joliette, Que., who finished second in each of the first two Nationwide events in Montreal, started 40th but was up into third place, challenging Villeneuve for second, when he blew his engine and was forced to retire after only 15 laps.

It is the only NASCAR event held outside the United States and it produced a rare statistic - three of the top five finishers were non-American.

Last year's race was the first official NASCAR event run on rain tires but was called off after 48 laps in a deluge that would not let up.