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, the points leader who has won three of the eight playoff races, also locked into one of the four Monster Energy Cup Series championship-contending spots at Homestead in two weeks.
Harvick and Kyle Busch clinched championship shots with their wins during the third round of the playoffs. That leaves only one spot up for grabs next week at Phoenix.
Harvick got his first Cup win at Texas’ 1½-mile, high-banked track, where he had won five Xfinity Series races and once in a truck series race.
“It’s been a long time coming,” Harvick said. “Great to check that one off.”
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.
Track 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, Brad Keselowski was fifth and Ryan Blaney was sixth. Chase Elliott finished eighth and teammate Jimmie Johnson was 27th after dealing with a loose car all day.
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 series champion Johnson.
Harvick felt he had a good car all day, and he finally had the chance to get around Truex for the last time after he kept driving deep into the first turn. Harvick led five times for 38 laps.
“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.”