Updated

Brazilian Tony Kanaan wins the Indianapolis 500 in competition that smashed the record for most lead changes and most leaders.

Kanaan drove past Ryan Hunter-Reay on a restart Sunday with three laps to go, then coasted across the finish line under yellow when defending race winner Dario Franchitti crashed far back in the field.

It was a hugely popular victory at the speedway, where Kanaan had endured so much heartache. The Brazilian had led 221 laps coming into the race, more than any other non-winner besides Michael Andretti and Rex Mays, yet had never taken the checkered flag. He finished second in 2004 and twice finished third.

Now, his face will go on the Borg-Warner Trophy. The crowd of some 200,000 roared when it realized that Kanaan had finally broken his Brickyard curse.

On the final lap, Kanaan lifted the visor on his helmet and appeared to dab at his eyes. When he pulled into Victory Lane, he planted a kiss on his wife, Lauren, and dunked an entire bottle of milk over his head.

The leaders came to the finish line all bunched up around Kanaan, saluting the longtime IndyCar stalwart who had longed to add the one missing piece to his resume. That was about as slow as anyone had driven all day. The average speed was 187.433 mph, another Indy record.

Rookie Carlos Munoz finished second with a brilliant IndyCar debut, followed by series champion Ryan Hunter-Reay, Marco Andretti and Justin Wilson. Helio Castroneves, trying to become the fourth driver to win four Indy 500s, ran up front much of the day but settled for sixth.

Kanaan and Andretti charged to the front during a wild first half of the race.

Kanaan quickly moved through the field from the outside of the fourth row while Andretti started on the outside of the front row and spent the first 29 laps playing leapfrog with Kanaan as the standard-bearer for his family bids to end the "Andretti Curse." The family hasn't captured the fabled Memorial Day weekend race since his grandfather, Mario, won in 1969. Michael Andretti has been to Victory Lane twice as a team owner with the late Dan Wheldon in 2005 and Dario Franchitti in 2007, but never won the race as a driver.

Marco Andretti was second in 2006 in the second-closest finish in the race's history.

Franchitti, the defending race winner, and Castroneves began the day in pursuit of their fourth victory. Only A.J. Foyt, Rick Mears and Al Unser have won the Indy 500 four times.

As the race reached the halfway mark, Team Penske roared to the front.

Will Power spent a stint in the lead before teammate A.J. Allmendinger, making his Indy 500 debut, picked his way through the field before falling back because of a problem with his safety belts. Allmendinger is a former open-wheel star who spent time in NASCAR before losing his ride after a failed drug test. He was given a second chance in the Indianapolis 500 by Roger Penske -- the same Sprint Cup team owner who had fired him.

Allmendinger was cheered on by Sprint Cup champ Brad Keselowski, who was on hand to support his boss's teams before catching a quick flight to Charlotte for Sunday night's Coca-Cola 600.

"I want to experience the IndyCar life here and see what it's all about and how this race plays out," Keselowski said. "I'm really excited to be here. This is my first Indy 500. I'm here soaking in one of the biggest races of the year with one of the best guys here, Roger Penske.'

The race began with a chill in the air -- the temperature was 62 degrees, not much warmer than the coldest race in history (58, 1992). Thousands of fans who piled into the historic track were bundled up against a stiff breeze that swirled down the front straightaway, and many arrived late, some blaming new security measures put in place after the Boston Marathon bombings.

Several drivers said the colder weather could produce more speed -- and more crashes. And it didn't take long for the first caution flag to come out.

J.R Hildebrand lost control in Turn 1 and slid into the outside wall. His car continued down the short chute before coming to a rest, where he climbed out of it without any injuries. It was Hildebrand who crashed on the final lap while leading two years ago.

"Just got a little loose in the middle of the corner, and I sort of got caught and spun around," Hildebrand said. "We felt like we had a car that could run at the front."

Most of the field had made its first pit stop when the second caution came out for Sebastian Saavedra, the 22-year-old Colombian driver for Dragon Racing.

The race resumed with pole sitter Ed Carpenter back at the front, though he also had a scare under caution. Carpenter was swerving back and forth to keep his tires warm when his car dived to the left, crossed through the grass in the corner and safely back onto the track.

Takuma Sato, who crashed while trying to pass for the lead on the final lap a year ago, also spun out exiting Turn 2. He managed to keep his A.J. Foyt Racing car out of the wall, though, and was able to stay on the lead lap when the race resumed.

Graham Rahal and teammate James Jakes were fined $10,000 for violating a rule that governs the way drivers blend back into the pack when they exit pit lane. Jakes was later assessed a drive-through penalty for a pit safety violation.