FORT WORTH, Texas (AP) -- The timing was perfect for Kevin Harvick's first NASCAR Cup Series victory at Texas. So was his winning pass.
Harvick went around the outside of Martin Truex Jr. for the lead on the 324th of 334 laps, then stayed in front the rest of the way Sunday to earn his championship shot in NASCAR's finale.
"It's been a long time coming," said Harvick, who had won five Xfinity races and a NASCAR Truck race there in the past. "Great to check that one off."
Truex had led 107 laps and was still up front until his bobble on the backstretch that allowed Harvick to take the lead. But Truex, with a significant points lead and wins in three of the eight playoff races, also locked into one of the four spots to race for the championship at Homestead in two weeks.
"A little disappointed to come up short, but to clinch a spot in Miami is unbelievable," Truex said. "Definitely got the job done today, and came here and did what we needed to."
Harvick and Kyle Busch clinched championship shots by winning during the third round of the playoffs. That leaves only one spot up for grabs among the five remaining playoff contenders next week at Phoenix.
After doing a long burnout along the frontstretch in the No. 4 Ford for Stewart-Haas Racing, Harvick went to Victory Lane, where the Texas celebration was missing the traditional firing of six-shooters by the winner.
TMS officials bypassed the use of the pistols after a man opened fire inside a church in a small community about 300 miles south of the track near San Antonio earlier Sunday. Authorities in South Texas said the shooter killed more than 20 people and wounded at least 10 others before being killed or killing himself.
Denny Hamlin, another of the playoff contenders, finished third, while Brad Keselowski was fifth and Ryan Blaney sixth. Chase Elliott finished eighth, and his teammate Jimmie Johnson dealt with a loose car all day and finished 27th.
Keselowski dropped from third to fourth in points, 57 behind Truex. Hamlin is fifth in the standings, followed by Ryan Blaney, Elliott and seventh-time Cup champion Johnson.
"I'd feel confident if we were locked in. These races you don't know what's gonna happen," Keselowski said.
Elliott knows that feeling, having been in the lead and two laps shy of the checkered flag a week earlier at Martinsville before getting wrecked by Hamlin. Instead of the possible win then that would have clinched a championship spot, he now likely has to win at Phoenix to advance.
"Yeah, I guess. … I assume so," Elliott said. "We'll just go on to Phoenix. We are going to try our best, try to get a victory and go on to Homestead."
Harvick felt good about his car all day, but had to earn the victory in Texas. He spent several laps chasing down Truex, and when he got behind the No. 78 Toyota was eventually able to execute on a cue he had taken from watching Kyle Larson driving really deep into turn one earlier in the race.
"I knew I needed to do something different in order to get past Martin. I tried to just start driving it in there and we kept going faster and faster," Harvick said. "I kept driving it in there and one lap I got close enough to get the air off the back of his car. I actually got to the outside and was able to pass him on the outside."
Then to Victory Lane and a championship shot.
JIMMIE'S TOUGH DAY: Johnson got to Texas only three points out of the top four, and had won there for the seventh time last spring. But he had to make an early stop because of a vibration issue. "It was just a bad day that kept getting worse," he said after finishing 27th place, his second-worse finish in his 29 Texas races.
RED FLAG: There was a red flag with 50 laps left after the No. 42 driven by Larson, who won the second stage and led 74 laps Sunday, got loose in Turns 1 and 2 and slammed hard into the wall. There was fire coming out of the rear of the car by time it came to rest on the backstretch.
ANOTHER DNF: It was the third straight race Larson wasn't able to finish. The first of those DNFs was two weeks ago at Kansas, when an engine issue led to his elimination from championship contention. He had gone into the playoffs second in points.
FINALE WHERE HE GOT FIRST: Dale Earnhardt Jr. got his first Cup Series victory at Texas in 2000, when he was a 25-year-old rookie driver. That is still the only of his 26 career victories that came in Texas. In his 30th start at Texas on Sunday, Earnhardt briefly led near the midpoint of the race during a cycle of green-flag stops. But he finished 35th, 30 laps off the pace, after having to go to the garage with about 90 laps left to replace the front left hub on the No. 88 Chevrolet.
AAA AGAIN: Texas Motor Speedway and AAA announced Sunday that the national insurance company and auto club has signed another multi-year renewal as title sponsor for the track's fall race that is part of the NASCAR playoffs. The title sponsorship began in 2010.
UP NEXT: The final elimination race at Phoenix, with five playoff contenders left and only one championship spot for the Nov. 19 finale at Homestead.