FORT WORTH, Texas—Joey Logano had a big lead and was within a half-lap of taking the white flag at Texas.

The late caution and extra laps? They just made his victory Monday in the rain-delayed Sprint Cup race that much more exciting.

With a last-lap pass of Jeff Gordon in NASCAR's version of overtime, Logano became the seventh different winner in as many races this season, with new rules for the championship Chase putting an increased emphasis on winning.

Logano had a 2.2-second lead on teammate Brad Keselowski while closing on in the white flag that would have guaranteed no extra laps. Then came out the caution for debris on the track after Kurt Busch went into the wall.

“My heart dropped,” Logano said.

“When you've got like 40-something laps after the last pit stop and a pretty sizeable lead, all you're thinking is where's the white flag, where's the white flag,” he said. “Then you go into Turn 1, and you see the 41 up against the wall, please, no caution. … You get so mad that you can barely control yourself.”

On the ensuing pit stop, Gordon took only two tires and exited first. Both Team Penske drivers took four tires, but Keselowski missed a chance to become the season's first two-time winner when he was penalized for speeding on pit road and finished 15th.

“I was just trying to get a little too much on pit road. … Tried a little too hard,” Keselowski said. “We're in it for wins. We're not in it for second. Second or 15th is the same for us.”

On a restart at lap 262, Logano quickly pulled his Ford away from the field and had a nearly 5-second lead before his last green-flag stop. After the green-white-checkered restart on lap 339, Logano went inside past Brian Vickers and quickly got behind Gordon's No. 24 Chevrolet that had only two fresh tires.

Heading onto the frontstretch, Logano went low and was able to get past Gordon going into the first turn.

“He crossed over and got into the back of me pretty good,” said Gordon, who took over the points lead. “At that point, I was just thinking, I just want to finish. Looked out my mirror, those guys were racing hard being me. A great, great second-place finish for me.”

Logano, the only driver with top-five finishes in both Texas races last season, got his fourth career victory after leading 108 of 340 laps—six laps more than scheduled. Team Penske joined Stewart-Haas Racing as the only teams with multiple winners this season.

Dale Earnhardt Jr. finished last in a 43-car field for the first time in seven seasons after driving his car into the rain-saturated infield grass before it shot across the track and slammed into the wall in a fiery crash. He took the blame for the accident on lap 13 that also led to problems for Hendrick Motorsports teammate Jimmie Johnson.

Johnson had damage on the windshield and front left of his No. 48 car from mud and debris after the Earnhardt crash. Johnson was three laps down by time he got back in the race after his team worked on the car, and the defending Sprint Cup champion also had an issue with a right-side tire before finishing 25th.

“I just didn't know I was that close to the grass and made a mistake,” said Earnhardt, who wasn't hurt in the crash. He later tweeted: “That wasn't fun. Sorry 2 the fans of the 88 team. Feel bad for my guys and the 48 team also. Made a mistake there that was costly for every1.”

The race started with 10 caution laps to make sure the 1˝-mile high-banked track was dry and suitable for racing after all the rain Sunday that pushed the race back a day.

There were still jet dryers on the track during those laps, and the high-pressure air from those apparently affected the hood and roof flaps on several cars. Keselowski made four trips down pit road as his crew worked to secure his hood, but he still got to retake his front-row spot next to pole-sitter Tony Stewart for the full green-flag start on lap 11 after NASCAR put the cars in their original starting spots.

Stewart led three times for 74 laps, the first he has led this season, and wound up 10th.

Earnhardt hadn't had a last-place finish since the 2007 fall race at Phoenix, a span of 222 races. But he won the season-opening race at Daytona, and has three other top-three finishes in the first six races this year and arrived in Texas as the points leader.