Denny HamlinChase contender Denny Hamlin claimed his second pole position of the season on Friday at Martinsville, as he aims to boost his title hopes with a third consecutive win at the half-mile track.

The Joe Gibbs Racing driver set a time of 19.518sec on his second flying lap, beating the previous benchmark set by Australian Marcos Ambrose, who will join him on the front row of the grid.

Hamlin won at Martinsville a year ago and then went on to claim victory in a rain-delayed event last March, a few days before surgery for a torn ligament in his left knee. This weekend he arrives at the sixth race of the championship playoff in second place, only 41 points behind leader Jimmie Johnson, a margin that he hopes to reduce on Sunday at what is arguably the best track for both him and the reigning champion.

"We spent all day working on qualifying trying to get the pole – trying to get that first pit stall because obviously we do feel like it's very important," said Hamlin. "I think if I'm ahead of the 48 then I could possibly set the tone in whether he leads a lap or not. That's a 10-point swing. That's a little bit of it.

"It all starts today and that's where our strategy's at. Other than that, I plan on trying to go out there and lead the most laps and win the race – just like everyone else is."

Ambrose claimed his best qualifying result of the season thus far, making an all-Toyota front row for Sunday. Roush Fenway's Greg Biffle was third and best of the Fords, while Ryan Newman headed the Chevys after his teammate Tony Stewart led practice earlier in the day.

Stewart will start from the third row of the grid alongside Earnhardt Ganassi's Juan Pablo Montoya, while Biffle's teammate Carl Edwards was the only other Chase driver in the top 10.

Seven-time Martinsville winner Jeff Gordon will line up 11th on the grid, while his Hendrick Motorsports teammate Jimmie Johnson had his worst qualifying for the past three years at Martinsville, ending in 19th place in the starting order.

Germain Racing's Casey Mears was the fastest of the non-guaranteed drivers in 20th, while Michael McDowell, Robby Gordon, Terry Cook and Johnny Sauter failed to make the field.

Pos  Driver              Car        Speed    Time     Gap
1. Denny Hamlin Toyota 97.018 19.518
2. Marcos Ambrose Toyota 97.003 19.521 + 0.003s
3. Greg Biffle Ford 96.988 19.524 + 0.006s
4. Ryan Newman Chevrolet 96.973 19.527 + 0.009s
5. Juan Montoya Chevrolet 96.959 19.530 + 0.012s
6. Tony Stewart Chevrolet 96.889 19.544 + 0.026s
7. Carl Edwards Ford 96.835 19.555 + 0.037s
8. David Reutimann Toyota 96.825 19.557 + 0.039s
9. Jamie McMurray Chevrolet 96.696 19.583 + 0.065s
10. David Ragan Ford 96.686 19.585 + 0.067s
11. Jeff Gordon Chevrolet 96.666 19.589 + 0.071s
12. Paul Menard Ford 96.657 19.591 + 0.073s
13. Regan Smith Chevrolet 96.622 19.598 + 0.080s
14. Scott Speed Toyota 96.607 19.601 + 0.083s
15. A.J. Allmendinger Ford 96.583 19.606 + 0.088s
16. Martin Truex Jr Toyota 96.479 19.627 + 0.109s
17. Clint Bowyer Chevrolet 96.460 19.631 + 0.113s
18. Jeff Burton Chevrolet 96.366 19.650 + 0.132s
19. Jimmie Johnson Chevrolet 96.352 19.653 + 0.135s
20. Casey Mears Toyota 96.342 19.655 + 0.137s
21. Mark Martin Chevrolet 96.244 19.675 + 0.157s
22. Joey Logano Toyota 96.229 19.678 + 0.160s
23. Bobby Labonte Chevrolet 96.190 19.686 + 0.168s
24. Sam Hornish Jr Dodge 96.166 19.691 + 0.173s
25. Brad Keselowski Dodge 96.136 19.697 + 0.179s
26. Kyle Busch Toyota 96.132 19.698 + 0.180s
27. Travis Kvapil Ford 96.107 19.703 + 0.185s
28. Dale Earnhardt Jr Chevrolet 96.024 19.720 + 0.202s
29. Landon Cassill Toyota 95.888 19.748 + 0.230s
30. Kurt Busch Dodge 95.888 19.748 + 0.230s
31. Elliott Sadler Ford 95.859 19.754 + 0.236s
32. Matt Kenseth Ford 95.767 19.773 + 0.255s
33. Kasey Kahne Toyota 95.685 19.790 + 0.272s
34. Dave Blaney Chevrolet 95.675 19.792 + 0.274s
35. Aric Almirola Ford 95.641 19.799 + 0.281s
36. Kevin Harvick Chevrolet 95.521 19.824 + 0.306s
37. Joe Nemechek Toyota 95.208 19.889 + 0.371s
38. Ken Schrader Ford 95.098 19.912 + 0.394s
39. J.J. Yeley Dodge 94.855 19.963 + 0.445s
40. David Gilliland Ford 94.780 19.979 + 0.461s
41. Robby Gordon Toyota 94.340 20.072 + 0.554s
42. Terry Cook Toyota 94.125 20.118 + 0.600s
43. Tony Raines Ford 94.092 20.125 + 0.607s
44. Kevin Conway Toyota 93.868 20.173 + 0.655s
45. Hermie Sadler Chevrolet 93.770 20.194 + 0.676s
46. Johnny Sauter Toyota - - -
47. Michael McDowell Chevrolet - - -