Hamlin’s car hooked up after the final pit stop Sunday, just as the sun finally broke through on an overcast afternoon, and he powered by Martin Truex Jr. for the lead. Hamlin then managed to hold off a late charge by Truex to win for the second time this season.

“Whether it was coincidence or not,” Hamlin said, “our car definitely felt better when the sun came out. I felt the car lost a lot of grip, but I guess a lot of guys did.”

Story continues below advertisement.

It was Hamlin’s first career win at Kansas, and gave his Joe Gibbs Racing team some momentum heading to Richmond, where the Virginia driver has won twice in 12 career starts.

“I felt all day I was behind the 56 and his car looked so superior to the whole field, and we just needed some kind of change — the weather, an adjustment — to make something happen,” Hamlin said, smiling. “And we got both of them.”

Jimmie Johnson was third for Hendrick Motorsports, which has failed in 14 tries to win the team’s milestone 200th race. Dale Earnhardt Jr. and Kasey Kahne also finished in the top 10.

“I was just watching from the third spot, hoping those guys would give me an opportunity,” Johnson said. “I just wish I was closer to those guys to race for it.”

Hamlin’s best finish at Kansas had been third last year, and for most of Sunday he was content to ride around during long green-flag runs out of the spotlight. His car kept getting better with each stop, though, and his Toyota finally took off at the end.

Just as the sun finally poked through on an unseasonably cold day.

“They didn’t panic,” team owner J.D. Gibbs said. “They paced themselves, and I’m glad the sun stayed out a little at the end.”

Truex dominated most of the afternoon, leading a race-high 173 laps, but had to settle for second place. It was his third top-5 finish of the season, but he’s yet to win in 175 races.

“Sorry guys, I lost this one for you,” a despondent Truex radioed to his team.

“Hey man, you did a great job,” came the reply. “They know we were here.”

Truex said his final set of tires cost him. He was the loosest he’d been all race, and that allowed Hamlin to charge into the lead. Truex rallied within a car length with two laps to go, but he couldn’t make a move on the bottom side stick, allowing Hamlin to pull away.

“I guess if we can be this frustrated with second, it tells you how close we are as a team,” said Truex, who hasn’t won since Dover in 2007. “The race car was really good. I’m just not really sure what to think about that last set of tires. I was just wrecking-loose that last set.”

Truex called the performance a statement moment for Michael Waltrip Racing.

Hamlin is starting to have a statement season.

He won this year at Phoenix, started on the pole at California, and led 31 laps a couple weeks ago at Martinsville before finishing sixth. He was 12th last week at Texas.

“We felt a lot like Phoenix in the sense we just hung around the top five all day, and at the end we just kind of make our charge, make our run,” Hamlin said. “There were a couple things that had to happen the last run for us to work out, and those things happened.”

Matt Kenseth finished fourth despite having a wild afternoon trying to get into the pits, often sliding across the commitment line. Greg Biffle followed up his victory last week at Texas with a fifth-place run, though he conceded he didn’t have the car to contend at Kansas.

“It was a tough day,” Biffle said. “We were back and forth all day, and we were off just a bit. When the track had a lot of grip the car was unbelievable.”

Kevin Harvick was sixth, followed by Earnhardt and Kahne, giving Hendrick Motorsports at least three cars in the top-10 for the second straight week.

Jeff Gordon had engine trouble late in the race and finished 21st.

The 14-race drought for Hendrick is its longest since going 15 races without a win during the 2002 and ’03 seasons. The streak began after Johnson’s win last October at Kansas.

“Everybody here needs a win for one reason or another,” Earnhardt said. “We’re all working really hard, but I’m not really focusing on homing in on that too heavily. You’ve got to think about what your car’s doing and what you need to do to help your car.

“Make your car faster, then the wins eventually take care of themselves.”

The pressure will continue to mount on the four-car team, though. And when Johnson was asked whether he’ll be relieved when someone gets the win, his reply came through unvarnished: “More than you could ever imagine,” he said.