MARTINSVILLE, Va. — Denny Hamlin figured that to give himself the best chance to succeed at Martinsville Speedway on Sunday, he had to start making it happen Friday.

Using practice to work only on his qualifying setup for what he said was the first time in his career, Hamlin accomplished what he called “objective No. 1” by winning the pole position for Sunday’s 500-lap NASCAR Sprint Cup race on its shortest, trickiest circuit.

“This is the first time for us doing that and obviously we executed it,” he said.

The reason for the attention to qualifying was twofold: the pole-sitter gets the best pit stall on the track’s narrow pit road, right at the front with nothing to obstruct his exit, and Hamlin wants to gain ground on points leader Jimmie Johnson this weekend.

Johnson holds a 41-point edge over Hamlin with five races left, and the two have combined to win the last eight races on the 0.526-mile oval. Hamlin has won three, including the series’ visit in the spring when he plowed to the front from ninth in the final four laps.

Johnson qualified 19th, and Kevin Harvick, who is third in points, was 36th.

“Odds are the 48’s not going to stay where he’s at and the 29’s not going to stay where he’s at,” Hamlin said. “As soon as the green flag drops, those guys are going to be coming.”

Hamlin’s speed of 97.018 mph barely edged Marcos Ambrose, who qualified at 97.003.

Greg Biffle and Ryan Newman will start in the second row, with Juan Pablo Montoya and Tony Stewart in the third row and Carl Edwards and David Reutimann in the fourth.

Ambrose said he felt lucky after spinning in practice and not damaging his car.

“I’m excited to be in the front row,” he said. “I’m going to stay there as long as I can.”

Biffle, who is eighth in points, almost lost control of his car on his warmup lap.

“That was pretty good considering I almost wrecked,” he said.

Jeff Gordon, who is fourth in points and 156 behind Johnson, will start 11th.

My guys, your guys

Clint Bowyer said he’s being a team player in letting Richard Childress Racing teammate Kevin Harvick use his pit crew while he’s in title contention.

Bowyer’s team is thought to be the strongest in the three-car RCR stable.

“We owe it to everybody involved — all the employees — to try to bring that championship back home,” Bowyer said, adding that he broke the news to his team himself on Tuesday.

He will be using Harvick’s team, and is sensitive to their feelings.

“The ones that it is hard for is the guys that have been with (Harvick) all year long and with five races to go you turn your back on them — that’s who it is hard for,” he said.

But he has big plans for the displaced crew now working for him.

“They’re the guys that I plan on winning this race with,” he said.

Well wishes

Kasey Kahne was introduced as the newest driver for Red Bull Racing on Friday, less than 48 hours after he and Richard Petty Motorsports agreed to part ways.

Kahne said he hopes rumors that RPM is in trouble prove untrue.

“It’s just speculation,” he said. “I think it’s a lot of talk. For me, I certainly hope that RPM keeps rolling. I hope that they finish out this season and put together another great season next year. That’s what I want them to do.”

Kahne will drive the No. 83 car Sunday and compete for Red Bull for the last five races of this season and all of next year. He will move to Hendrick Motorsports in 2012.

Red Bull General Manager Jay Frye said bringing Kahne aboard five races ahead of schedule amounts to a headstart on getting the team ready to compete for the 2011 championship.

Frye said Red Bull plans to have two cars next year, and disputed talk that the team has already decided to release driver Scott Speed, who is 28th in points this season. Red Bull also employs Brian Vickers, who had heart surgery to remove blood clots in July.

Frye said the team is monitoring Vickers’ health and Speed’s performance.