CONCORD, N.C. - Denny Hamlin gave Joe Gibbs Racing its first victory in NASCAR's Sprint All-Star race by using clean air to hold off Kevin Harvick at Charlotte Motor Speedway.

"It's been a long time coming," said Joe Gibbs, who got his first All-Star victory in 24 races.

Hamlin won the pole for Saturday night's race, was decent through the first four 25-lap segments, but was slotted sixth based on average finish for the mandatory final pit stop.

His No. 11 team, one of the top pit crews in the Sprint Cup Series, got him back on track in first.

"The pit crew just knocked it out of the park," said Hamlin. "That was prime-time right there."

Hamlin was aided on the final pit stop when Brad Keselowski, who raced Hamlin off pit road but exited second, was flagged for speeding.

Keselowski dropped to the rear of the field — taking him out of contention — and putting Kurt Busch, Harvick and Kasey Kahne right behind Hamlin.

Hamlin controlled the restart and jumped out to a huge lead, and Harvick moved into second and tried to chase down the leader.

But it was never going to be an easy task — every driver in the 20-car field wanted to be out front for the final 10-lap sprint to the finish because NASCAR's current rules package has shown that the leader, in clean air, is very difficult to pass.

Although Harvick briefly closed the gap, he had to get out of the throttle when his car drifted too far up the track, and he never got close enough to even attempt a move for the lead.

Hamlin collected the $1 million prize while also giving manufacturer Toyota its first win in the All-Star race.

"Everybody wants to be an All-Star," Hamlin said from victory lane. He praised Joe Gibbs, who had won all of NASCAR's crown jewel races but had come up empty in the All-Star race.

"He's got a lot of great accomplishments. He's won every big race on this circuit, so this means a lot," said Hamlin.

Then, in a rush to start the post-race celebration, he tried to hurry along his post-race news conference. He detailed his race and succinctly summarized the victory: "Everything just came together perfectly for those 10 laps. ... That should cover everything."

Harvick finished second and lamented a lost opportunity.

"Thought we were in a good spot," he said. "I had committed to the centre of the corner and just really lost the front of the car up the racetrack, had to get out of the throttle, lost five or six spots."

Busch finished third and believed Hamlin jumped the restart.

"We restarted second and we're going to have to go to the tape and look at it to see if Denny went too soon," Busch said. "I was asleep at the wheel on the restart."

Jeff Gordon finished fourth in his final All-Star race and was followed by Matt Kenseth.

Kyle Busch was sixth in his first race back since he was injured in a February crash at Daytona. Busch missed the first 11 Sprint Cup races of the season after breaking his right leg and left foot when he crashed into a concrete wall in the Xfinity Series opener.

He returned for the non-points All-Star race as a tuneup for next Sunday's Coca-Cola 600, the longest race of the season.

"Real fortunate just to get back in the race car, get out there and feel things out," Kyle Busch said. "Everything felt good and getting to pit road, all that, everything was fine."

Kahne was seventh and followed by Joey Logano and then Keselowski, who said he had to hustle off pit road on the final stop to have any shot at the win.

"Whoever gets the clean air with this format and this rules package is going to drive away," Keselowski said. "I knew when I came out of my pit stall and the 11 was pulling out with me that I either beat him to that line or lose the race.

"I told my crew chief I'd rather go down swinging than take a strike and wonder what might have been. I swung and missed."

The race was free of competition cautions, the first time since 2008 there were no yellow flags for on-track incidents or issues.