FORT WORTH, Texas -- Jimmie Johnson took the lead from Joey Logano with 16 laps to go in the O'Reilly Auto Parts 500 NASCAR Cup Series race on Sunday at Texas Motor Speedway and claimed the first win of the season for himself and Hendrick Motorsports.
It was Johnson's seventh win at Texas, the most of any active driver.
Harvick and Martin Truex Jr. combined to lead most of the third stage until Logano stretched his fuel mileage and pitted later during two cycles of pit stops.
The yellow flag waved for the final time on lap 299, just a few laps after Logano made his last green-flag stop. When the caution came out, Logano stayed out to inherit the lead.
After leading most of the first half of the race, Ryan Blaney and several other frontrunners, including Johnson and Larson, were shuffled back through the field by pit strategy.
The top-seven cars, led by Blaney, stayed out when the yellow flag waved with a handful of laps remaining in the second stage. Instead, they pitted when the stage ended and Larson restarted 20th.
The strategy of pitting with six laps to go in the stage and staying out at stage end put Harvick up front and Brad Keselowski and Earnhardt Jr. in the next two spots.
Blaney won the first two 85-lap stages of the race.
He lost the lead to Truex on pit road during the caution between the first two stages, but when the race restarted, he retook the top spot.
Truex ran second to Blaney through most of the first half of the second stage, but on a restart after a caution just after lap 120, Truex drifted high and lost several positions. He eventually fell outside the top 20.
Johnson was second to Larson at the end of the second stage after starting the race in the back.
Blaney first took the lead from pole-sitter Harvick on lap 15.
Harvick beat Blaney off pit road during a lap-30 competition caution, but when the race restarted, Blaney retook the lead after Harvick opted to restart on the outside.
Blaney built a lead of four seconds in the second half of the stage, but when Truex took second from Harvick, he closed on Larson in lapped traffic.
Larson, meanwhile, drove up through the field twice to finish the first stage in sixth.
After starting the race in the back, Larson got into the top 10 by lap 25. But during the competition caution, he drove through too many pit stalls and restarted 30th. It was his first pit-road penalty this season.
The race on pit road was eventful for Chris Buescher's team. The team's jackman was hit by the car during an early-race caution.
Despite being uninjured, the jackman was replaced for the remainder of the race by a Richard Childress Racing backup. Later in the race, another crew member was hit in the face by a lug nut.
NOTES: Texas Motor Speedway was repaved and reconfigured since it hosted its last race. Banking in turns one and two was decreased from 24 to 20 degrees and the racing surface at the same end of the track was widened from 60 feet to 80 feet. ... Erik Jones, Chase Elliott, Kasey Kahne and Trevor Bayne raced backup cars after crashes in practice. Bayne and Kahne started in the back because they went to backups after qualifying. Kyle Busch and Denny Hamlin spun in practice and Jimmie Johnson in qualifying but were able to continue in their primary cars. Johnson had to start in the back because his tires were changed after qualifying. ... Nine drivers failed to make qualifying attempts Friday because of difficulty getting their cars through inspection. They included Jones, Elliott, Busch, Dale Earnhardt Jr., Kyle Larson and Kasey Kahne. ... Ford claimed the top-five spots on the starting grid, led by Kevin Harvick. Harvick was fastest in all three rounds of qualifying. ... Jones won the NASCAR Xfinity Series race at Texas on Saturday after leading 112 of 200 laps. Nine drivers in Sunday's race also ran the Xfinity race. ... Busch won the 2016 O'Reilly 500, but Carl Edwards was the most recent winner at TMS in November.