HOMESTEAD, Fla. — Kevin Harvick charged through the field, picking off car after car, passing two other title contenders on a series of restarts.

As he aggressively chased the victory and his first Sprint Cup title, it was clear that winning did indeed matter most in NASCAR’s new championship formula.

Harvick won Sunday night’s season finale at Homestead-Miami Speedway with a desperate drive from 12th to first over the final 15 laps. He didn’t have to win the race; he only had to finish higher than the other three title contenders in this revamped Chase for the Sprint Cup championship.

But nothing short of a win was going to get it done on a night in which Harvick, Denny Hamlin, Ryan Newman and Joey Logano all showed up determined to claim their first career championship.

“You had all the championship guys show up at the front of the pack,” Harvick said. “I was just going to hold the pedal down and hope for the best.”

The four drivers all found themselves racing each other at the front of the field after the sun went down on the 400-mile race. It was Hamlin, the Charlotte Bobcats season-ticket holder who had Michael Jordan cheering from his pits, who seemed to have the race in control until a caution with 20 laps to go.

All four teams were forced to make tough strategy decisions that ultimately decided their fate.

Joe Gibbs Racing decided not to pit Hamlin, which moved him to second on the restart. Richard Childress Racing gave Ryan Newman two tires, while Harvick crew chief Rodney Childers made the risky call for four tires.

Team Penske had also planned to give Joey Logano four tires, but a problem with the jack destroyed Logano’s chances and he plummeted from sixth to 21st, ending his championship bid.

Harvick restarted 12th with 15 laps to go and not much time to pick his way through traffic. As Hamlin passed leader Jeff Gordon on the restart, Harvick shot past four cars to move to seventh.

Then came another caution, and Hamlin, on old tires, knew he was in trouble. Harvick, on four fresh tires, rocketed through the middle on the restart, dicing his way through traffic to pick up another four spots and move into second.

“I loved our chances, but they weren’t there at the end,” said Hamlin. “Strategy is part of winning, and the strategy for us didn’t work out with the cautions.”

Harvick got by Hamlin, then Newman passed Hamlin for second and the championship became a battle of drivers who had essentially swapped seats this year. There was one more caution, forcing Harvick to nail one final restart with three laps remaining, and he eased his way ahead of Newman and never looked back.

The victory capped a magical first season at Stewart-Haas Racing, where Harvick moved this year after 13 seasons with Richard Childress that failed to produce a championship.

Harvick, who had to win last week at Phoenix just to advance into Sunday’s final four, wrapped up his third victory of this Chase and fifth of the season. He leaned this week on team co-owner Tony Stewart, a three-time champion, and Jimmie Johnson, the six-time champion who moved from California to North Carolina to chase a career in NASCAR about the same time as Harvick made the move east.

“Been trying for 13 years,” an emotional Harvick said. “This week ate me up. If it wasn’t for Jimmie Johnson and Tony Stewart, I would have been in bad trouble this week. Those guys really helped me get through the week. After every practice, Jimmie was in there, and in our team debriefs Tony was constantly telling me just to go race and that it’s just another race.”

Stewart shared a hug with Harvick, then beamed during the celebration.

“That’s about as emotional as you can get, to have one of your greatest friends go out in one of your race cars and win a championship in the toughest series in the country,” Stewart said.

Newman, winless on the season, finished second. Hamlin faded to seventh and Logano was a distant 16th.

Harvick’s wife, DeLana, sobbed on the pit stand and buried her head in her hands when Harvick crossed the finish line. She hugged crew chief Childers, who dabbed his eyes, before she made it down to the victory celebration. She met Stewart, who had retired from the race earlier with a car problem and was in street clothes, for an embrace and kiss before holding her son for the victory celebration.

Harvick hugged Childers and showered his jubilant crew with Budweiser, the beer company that followed him this year from Richard Childress Racing to Stewart-Haas. Harvick spoke with a catch in his voice, trying to compose himself when it was his turn to hold 2-year-old Keelan.

“I’m glad you’re awake,” Harvick told him. “Are you happy you’re awake? Can you say, ‘I believe daddy won? Say it. Really loud.’ ”