Kevin Harvick dominated a race he had to win to advance to the final round of NASCAR's playoffs, while Jeff Gordon was knocked out when Ryan Newman completed a last-lap pass.

Harvick led 264 laps at Phoenix International Raceway on Sunday to earn an automatic spot next week in the four-man Chase field in the finale at Homestead.

Harvick has won the last three fall races at the mile oval, also won at the track in March race and has a record six Phoenix victories.

Gordon finished second, but lost his bid for a fifth Sprint Cup championship when Newman knocked Kyle Larson into the wall on the final lap to finish 11th — and a point ahead of Gordon.

Denny Hamlin, the points leader after finishing fifth, and Joey Logano also advanced. The title will be decided by finishing order among the final four at Homestead.

Failing to advance with Gordon were Brad Keselowski, Matt Kenseth and Carl Edwards.

Logano finished third, Keselowski was fourth and Edwards 15th.

It was a devastating blow for Keselowski, who leads the series this season with six wins and won a race in each of the first two rounds of the Chase. But he fell into a hole because of a mechanical problem at Martinsville in the first event of this three-race round that he couldn't recover from despite strong finishes at Texas and Phoenix.

His mettle was definitely tested, too, as his aggressive driving style angered his competitors and led to two fights in four races. He was fined $50,000 for his post-race behavior at Charlotte last month — actions that caused Kenseth to jump him from behind in the garage — and he and Gordon were both bloodied when the drivers and the teams brawled on pit road after last week's race at Texas.

Hamlin, who came to Phoenix tied with Logano for the points lead, won the pole and needed only to finish 11th or better to guarantee himself a spot in the finale.

But a broken valve stem caused his right rear tire to go flat under caution immediately after the first round of pit stops. Hamlin had to pit a second time, went from fourth to 35th on the restart, and sounded panicky as he struggled to regain his lost positions.

"I'm trying, man, I'm trying," he radioed.

"Ten-4 buddy, you don't have to get it all back this run," crew chief Darian Grubb replied.

He went a lap down with 236 laps remaining in the race.

Logano took a hit when he was penalized for pulling out of his pit stall with the fuel can still attached to his car. He went from second to 26thon a restart with 185 laps remaining.

"We'll recover from this," crew chief Todd Gordon said.

It put him and Hamlin in the middle of the pack at the same time, and the two waged a furious battle to put themselves in position to be the driver to earn a free pass back onto the lead lap. Hamlin aggressively went three-wide on a restart to pass Logano and take the position, but Logano eventually passed him and was rewarded when the caution came out with 111 laps remaining.

With both drivers doing their best to get back into contention, Logano suffered slight damage in an accident on Lap 112. His crew strategized on how to fix it without giving up track position, and it saved Logano as he quickly worked his way through traffic.