AVONDALE, Ariz. — Denny Hamlin saved his season by winning Sunday at ISM Raceway to advance into NASCAR's title-deciding race — a victory that eliminated champion Joey Logano from the playoffs and gave Hamlin his first chance at winning the Cup since 2014.

Hamlin, the Daytona 500 winner and a favorite to win the title, had fallen below the cutline after spinning last week at Texas and came to Phoenix determined to win and claim his spot in the final four. He had the race well under control until a caution with nine laps remaining set up a final restart.

Hamlin, who had been terrible on restarts the entire race, punched his steering wheel in anger when the yellow flag waved. His Joe Gibbs Racing team made an unusual call to take just two tires — the same strategy as contender Ryan Blaney — and the two lined up next to each other for the restart with three laps to go.

Hamlin finally got a decent restart, pulled into the lead, and Gibbs teammate Kyle Busch passed Blaney to put a buffer between the two.

Hamlin then cruised to his sixth win of the season and punched the air with his fist in his car as he crossed the finish line. He jumped into the arms of his waiting crew, which he had promised earlier Sunday to give his all in an effort to make the championship field at Homestead-Miami Speedway.

"This race team worked so hard to be here and deserved to be here," Hamlin said. "I told them I would give them everything I've got to make up for the mistake I made last week."

Hamlin will race Gibbs teammates Busch and Martin Truex Jr., as well as Kevin Harvick of Stewart-Haas Racing, for the championship. Gibbs, winner of 18 races this season, and Toyota have three of the slots in the final four. Chevrolet will not be represented for the second consecutive season and Harvick races a Ford.

Chase Elliott, Kyle Larson, Blaney and Logano were eliminated. Logano was seeking a chance to make it back-to-back titles but had a mechanical problem early in the final stage that dropped him deep into the field.

Of the title contenders, only Hamlin has never won a championship. He blew two opportunities, in 2010 and 2014, and hasn't been back into the title round since.

ELLIOTT'S AWFUL ROUND

Elliott's championship chances ended with a crash in the final stage. He had to win to earn a berth at Homestead after a disastrous third round of the playoffs.

NASCAR's most popular driver had a mechanical problem at Martinsville, crashed last week at Texas and crashed Sunday when he appeared to have a tire issue that caused him to spin.

"Just a continuation of our first two weeks," Elliott said. "I feel like we were in a good position to run solid. Not sure why we had a tire go down, I think that's what happened. These last three weeks have been rough."

UP NEXT

Sunday's championship-deciding finale at Homestead-Miami Speedway, the last time the track will host the finale. Logano is the defending race winner.