HOMESTEAD, Florida (AP) — Denny Hamlin and Joey Logano, eliminated from title contention in earlier rounds of NASCAR's playoffs, played spoiler Friday by sweeping the front row for the season-ending race at Homestead-Miami Speedway.

Hamlin, who was eliminated in the second round of the Chase for the Sprint Cup championship, won the pole. Logano, who had the strongest car during the Chase and probably should be in the four-driver finale, qualified second.

"We wish we were a part of it but unfortunately a couple mechanical things took us out of this Chase, but we're going to hopefully go out with a bang," said Hamlin, who jokingly referred to himself as "Mr. Irrelevant."

Logano, who swept all three races in the third round of the Chase, is seeking a win at Homestead to bookend a season that began with a Daytona 500 victory.

The championship will be decided Sunday and go to the highest finishing driver of the final four in the Chase. The four racing for the title are: defending series champion Kevin Harvick, Jeff Gordon, Kyle Busch and Martin Truex Jr.

Busch posted the third-fastest lap, best among the Chase finalists.

Gordon was fifth in qualifying for the final race of his career. The four-time NASCAR champion is retiring at the end of the season and used three strong runs in qualifying to earn a solid starting spot.

"I'm anticipating Sunday being truly insane," Gordon said. "I'm having a blast. Just seeing people that I grew up racing quarter midgets with, family and friends.

"With our effort in qualifying, we showed how bad we all want it, to be better than just being here battling for the championship and it being my final race."

Truex qualified 11th and with Gordon's run in the second round, he prevented Harvick from advancing to the final round of qualifying. Harvick will start 13th, lowest of the Chase finalists.