Denny Hamlin raced to his second NASCAR Cup victory of the season, overcoming two penalties on pit road and missing the entry another time during green flag conditions Sunday in Texas.

While Hamlin led the final 12 laps, and 45 of the 334 overall, Joe Gibbs Racing teammate Kyle Busch missed out on the chance for a tripleheader weekend sweep.

"We had a super-fast car, and that's why we won," Hamlin said. "I missed pit road under green, that cost three or four seconds as well. We tried every way that we could to give it away. We just found a way to do it."

Hamlin's No. 11 Toyota finished more than 2.7 seconds ahead of Clint Bowyer. The race, which had only three cautions outside the two stage stoppages, featured 27 lead changes among 13 drivers.

It was the 33rd career victory for Hamlin. He won the season-opening Daytona 500 after he went winless last year to end a streak of 12 consecutive seasons getting into Victory Lane.

His third win at Texas was his first since sweeping both races at the 1 1/2-mile track in 2010.

Gibbs drivers have won four of the seven races this season, and Team Penske won the other three.

Clint Bowyer finished second, followed by his Stewart-Haas Racing teammate Daniel Suarez. Erik Jones was fourth ahead of polesitter Jimmie Johnson, whose career-long winless drought reached 66 races. William Byron, Aric Almirola, Kevin Harvick, Kurt Busch and Kyle Busch rounded out the top 10.

Kyle Busch led six times for race-high 66 laps, and was still in front with 59 laps to go when his No. 18 car drifted high going into Turn 2. Though he avoided contact then, he dropped back to fourth and when trying to get back in front a few laps later brushed the outside wall. He fell a lap behind after having to go to pit road to change right-side tires.

For the second time in a month, he missed out on a tripleheader sweep after going into the Cup race following Xfinity and Truck Series races in the same weekend. He completed such sweeps twice at Bristol, in 2010 and 2017.

It was the third time at Texas that Busch won the Xfinity and Trucks Series races before coming up short in the weekend-ending Cup race. That also happened to him at his home track in Las Vegas four weeks earlier.

Johnson, whose last win was at Dover in June 2017, led the first 60 laps and then got in front only one more lap.

That was still more laps led combined in the No. 48 Hendrick Motorsports Chevrolet than he had combined all of last season and the first six races of this year.

STAGE ZERO

Joey Logano won the first 85-lap stage in the race, and at that point was the only driver who had scored in every stage so far this season.

That scoring streak ended in the second stage, when he slipped to 15th after a penalty on pit road for an uncontrolled tire. The Penske driver also had issues with a loose hood that was wavering on a windy day during the second stage.

Logano, who won at Las Vegas, finished 17th.

FROM WIN TO BACK

Brad Keselowski was coming off a win at Martinsville, but there would be no back-to-back wins for the No. 2 Penske Ford that has already won two races this season. Keselowski was scrubbing tires on the track for the restart before the second stage when something went wrong.

"Something broke out of nowhere. We weren't going very fast or anything and something in the back of the car broke and it won't go," Keselowski said.

After extended time to repair the car, Keselowski got back on the track and finished 36th in the 39-car field, 55 laps behind the winner.

UP NEXT

NASCAR is headed to Bristol, where the Busch brothers have a combined 13 wins — seven for Kyle, six for Kurt. No other active drive has won more than twice at that short track. Kurt Busch won the second Bristol race last August, after Kyle Busch won the previous two races there.