Michael Waltrip Racing has boosted its position in the Sprint Cup points standings, but when actual victories are factored in, Toyota's success still begins and ends with Joe Gibbs Racing. In 2012, that's Denny Hamlin.

Hamlin, who won at Phoenix earlier in the season, won Kansas Speedway's STP 400 at the expense of Martin Truex Jr., who otherwise dominated the race in one of the MWR Toyotas.

Truex, who hasn't managed to follow up a 2007 victory in Dover, Del., dominated the STP 400 before yielding the lead to Hamlin with 30 laps remaining.

The Gibbs team has won twice this year. Waltrip's team has won twice in its history, both with a driver, David Reutimann, no longer employed there. Truex races for Waltrip.

For all but the opening laps, when pole winner A.J. Allmendinger kept his Dodge at the front of the pack, Truex led most every lap that mattered, yielding only briefly during pit sequences.

But Hamlin stole the race for his 19th career win. It was his first victory at Kansas Speedway in nine tries.

Jimmie Johnson brought a Chevy home third, followed by the Fords of Matt Kenseth and point leader Greg Biffle.

Allmendinger pulled out to a comfortable lead in the early going, though Kevin Harvick and Truex eventually tracked him down. Allmendinger maintained the lead until the first green-flag pit sequence, before which he apparently ran out of fuel and dropped to seventh as Truex assumed the lead. Allmendinger led the first 44 laps; Truex, 45 of the next 47.

Dale Earnhardt Jr. lost a bit of track position when he missed pit road on lap 44. He recovered to finish seventh.

Fuel pickup, currently among the more taboo subjects in the sport, also cost Harvick track position. When his Chevy coasted around the track and dropped a lap behind, its example seemed to create another cycle of green-flag stops.

In the first 100 laps, Allmendinger, Harvick and Kasey Kahne all ran out of fuel or suffered some sort of pickup issue. Meanwhile the engine problems experienced by other Toyota drivers — Bobby Labonte, Clint Bowyer — intensified as the race entered its final half.

Johnson emerged next. His Chevy tracked down Truex, but Johnson couldn't pass. He also failed to do so when the two pitted on lap 178.