It’s hard to pick the most compelling element of Sunday’s race to decide the NASCAR Sprint Cup championship. Was it the jaw-dropping comeback? The historic duel? The down-to-the-wire finish? Even Tony Stewart and Carl Edwards couldn’t quite believe the race they’d just run, the season they had just concluded, the history they had just made.

Stewart won the rain-delayed Ford 400 at Homestead-Miami Speedway and the season’s championship by the narrowest of margins and maximum amount of drama. He threw out daring driving, bold decision-making and hair-raising passes to overcome early car trouble that at one point left him in 40th place.

He passed 118 cars during the 400-mile race on a 1.5-mile track, but in the end it was only Edwards — the man leading the Sprint Cup series by just three points at the race’s start — that he had to hold off for the victory.

Over the last 40 laps of the 267-lap race, the two drivers raced as if there were no other cars on the track, but Stewart refused to relinquish the lead it took him half of the day — and all season — to gain. His victory secured him his third Sprint Cup series championship even though he and Edwards, who finished second, ended up tied in points with 2,403.

Stewart won the tiebreaker since he had won more races during the series.

“If this wasn’t one of the most exciting races to watch from a fan standpoint, you’ve got to go to a doctor immediately,” said Stewart, 40. “I feel like I passed half the state of Florida. . . . This is definitely one of the greatest races of my life.” 

Edwards had been the most consistent driver throughout the series, but it was Stewart who showed a knack for occasional brilliance, winning five races this season to Edwards’s one. Stewart, who also won Sprint Cup titles in 2002 and 2005, brought out his most aggressive side Sunday, repeatedly using the restarts after the eight caution flags to fly out and gain ground.

“This night is about Tony Stewart,” Edwards said. “Those guys rose to the occasion. They beat us fair and square. . . . I told my wife, if I can’t win this thing, I’ll be the best loser NASCAR has ever had. I’m going to try really hard to keep my head up.”

Edwards earned a one-point bonus for leading the most laps (119). That bonus point pushed him into a tie with Stewart — who led 65 laps — in the season series.

“I’d compete with him in just about anything else to break that tie if we could set up something,” Edwards joked.

Edwards drove all but unchallenged for the first 109 laps, leading 87 of them, yet he had plenty of reason for apprehension: an increasingly tenacious performance by Stewart, engine problems for two teammates at Ford Racing, and a 74-minute rain delay that interrupted his momentum.

“They showed a lot of mental toughness to watch us go lead for the first half of the race, essentially, and not panic, not make mistakes,” Edwards said.

Indeed, things looked bleak for Stewart early on. Just a few laps into the race, he found himself puzzling over a gaping hole in his front grille; he said on his car radio he had no clue what caused it. Stewart stopped twice for repairs; his team put a new grille over the old one and used electrical tape to secure it.

Despite the problem, Stewart had climbed to fifth place by the time the rainstorm came, putting heavy pressure on Edwards as the caution flag fell.

“After the way the first 109 laps went today, I couldn’t be more proud,” Stewart said. “I told [my crew], ‘Man, it’s really going to make these guys mad . . . when we come back and kick their butts.’ ”

The butt-kicking commenced as soon as the race resumed after the lengthy delay. Stewart went screaming out on the restart and took the lead on the 123rd lap. That move ignited what turned into a furious and strategic duel to the finish.

Edwards and Stewart fell back after another caution, which provided Stewart with another opportunity to leave mouths agape. In ninth place, he roared by a trio of cars, including Edwards’s Ford, with a powerful and risky move on the inside of the track. It took him just six laps to reclaim the lead on the 152nd lap.

“That shows you how bad I wanted to win this thing,” Stewart said. “When you are going for a championship, you can’t hold anything back.”

Martin Truex Jr., finished third, with Matt Kenseth  and Jeff Gordon in fourth and fifth. Jimmie Johnson not only failed in his quest for a sixth straight championship, he ended this season with a miserable performance thanks to engine trouble that perplexed him and his crew. He hit the wall and spun out in Lap 143. He finished 32nd.

But the official end of Johnson’s dynasty didn’t warrant much attention Sunday. Few could take their eyes off the race between Stewart and Edwards.

“I’m sure that there will be people that will say, ‘This was fake, this was set up,’ because it’s just so unbelievable,” Edwards said. “It’s like a movie.”