Jeff Gordon claimed his first win of the 2014 season on Saturday night when he took the checkered flag in the 5-hour Energy 400 NASCAR Sprint Cup Series race at Kansas Speedway.

"I think (the key to winning) was overcoming a lot of adversity," Gordon said. "We had a lot of things in the first half of the race that did not go our way. We knew we had a fast race car. We weren't sure if we had as good of a race car as Kevin (Harvick), but I thought if we got in front of him, we could hold him off."

Kevin Harvick took second, Kasey Kahne was third, Joey Logano fourth and Dale Earnhardt Jr. fifth. Danica Patrick finished a career-best seventh.

"It was all strategy," Logano said. "Our AAA Fusion was fast; we just weren't fast enough, I guess. I was really good on the short runs toward the middle part of the race. That last restart, the 4 (Harvick) and the 24 (Gordon) just took off and left me."

Gordon moved in front of Harvick on the last cycle of green-flag pit stops in the final 30 laps. After the last driver to stop, Brad Keselowski, stopped with nine laps to go, Gordon took the lead.

"What put us in second is I just didn't get down pit road very good there coming to the pit box the second time," Harvick said. "I kind of ran out of gas, and I was paying attention to the fuel pressure gauge instead of the pit road speed light. I lost some time there, but everybody on our Jimmy John's Chevrolet did a good job."

After getting back on track, Harvick made a late-race charge at Gordon that fell just short.

"I knew we had a fast race car. We've had fast cars all year," Gordon said. "Kevin was tough. He had a really fast car. I didn't know if I was going to be able to hold him off."

Harvick got back to the front on a restart after a caution that came out with 65 laps to go in the 267-lap race. He had been mired back in the field after pitting under green shortly before a caution on lap 110.

Kahne took the lead shortly after the halfway point, but Logano spent the most time up front before Harvick made his way back up to the lead.

"We had a fast Farmers Insurance Chevrolet," Kahne said. "We got third, so that is good. It's the best run we have had in a while. Felt really good about it, led some laps."

Despite experiencing a clutch issue, Jimmie Johnson was in the top three at the time of caution with 65 laps to go, but he gave up the spot to pit while most of the other front-runners stayed out.

As a result, Johnson was able to lead several laps as other drivers pitted late before having to make his last stop.

Logano was the race leader at the halfway point. He moved into second on a restart after a caution on lap 110 and then got by Dale Earnhardt Jr. on lap 123.

Kahne was second and Earnhardt third at the midpoint of the race.

Harvick dominated the first half of the race, leading 90 laps. He was out front from the start until his first trip down pit road on lap 42. By that point, he had lapped nearly half the field.

Lapped cars began hitting pit road on lap 40. When the yellow flag waved for the first time on lap 47, Keselowski, the only driver yet to pit, was all alone on the lead lap.

Harvick was scored as the first driver a lap down, so he was awarded his lap back. Others got back on the lead lap by virtue of wave-arounds.

As soon as the race restarted, Harvick retook the lead.

Logano ran second to Harvick for most of the laps before the cycle of green-flag stops. Afterward, Keselowski was able to maintain second until Johnson got by him on a restart after a lap 60 caution.

Johnson gave up the spot, though, to pit the next time the yellow flag waved. With most of the lead-lap cars staying out, Johnson restarted 17th and Keselowski and then Gordon spent time running second behind Harvick.

During a later caution, Johnson reported that he had lost his clutch.

NOTES: Kevin Harvick won from the pole at Kansas in the Fall 2013 race. ... Harvick set a Kansas Speedway qualifying record with a 194.658 mph lap on Friday. ... The race was the 300th Sprint Cup race for Emporia, Kan., native Clint Bowyer. ... The race was delayed by nearly 45 minutes because of lightning and then light rain. ... Kyle Busch dominated the NASCAR Camping World Truck Series race at Kansas on Friday night, winning after leading 104 of 167 laps.