Updated

Tony Stewart has won his third Sprint Cup ending Ford 400 in thrilling fashion Miami Speedway.

Stewart and Carl Edwards, who finished second in the race, ended the 2011 season with 2,403 points each, but Stewart won the series title by virtue of his five wins this season -- all of them in the Chase for the Sprint Cup -- compared to only one victory for Edwards, which came in March at Las Vegas.

Starting 15th, Stewart ran over debris and damaged his front end grill. He had to pit twice under caution for repairs and fell back as far as 40th early in the race. But Stewart battled back from his incident as well as two slow stops later in the 400-mile race.

Stewart last pitted with 56 laps to go in a fuel and tire strategy, and then took the lead for good when he passed Kyle Busch after a restart with 37 laps remaining. Stewart beat Edwards to the finish by 1.3 seconds for his third win at Homestead.

The 300-mile race at Homestead was stopped for one hour, 15 minutes for an isolated shower. Rain also slowed the event two other times.

"If this doesn't go down as one of the greatest championship battles in history, I don't know what will," Stewart said as rain began to fall again on the 1.5-mile South Florida racetrack.

Edwards, the pole sitter, led the most laps with 119, which earned him two bonus points.

Martin Truex Jr. finished third, followed by Matt Kenseth and Jeff Gordon.