Casey Stoner has taken his ninth pole position of the year during the last qualifying session of the 2008 MotoGP season, at Valencia.
The 2007 world champion emerged on top of an action-packed session, which took place on an all-but-dry track - with overcast skies threatening rain at any moment, prompting the MotoGP field to push hard right from the start of the session.
Nicky Hayden, fastest in all three free practice sessions, ruled much of the hour - at one point by almost a second - before being toppled by future team-mate Stoner with 14 minutes to go.
Hayden, desperate to end his Honda career with his first pole of the year, made several thrilling attempts to beat the Australian - his Repsol Honda sliding and spinning its way around the twisty Spanish circuit as Hayden pushed his rear Michelin over the limit.
The American got within 0.14sec of Stoner on his first attempt, but Casey responded by propelling his Ducati a further 0.4sec clear. Hayden got within 0.2sec on his last flying lap, but was then denied second position when Bridgestone-shod team-mate Dani Pedrosa delivered an excellent final lap to jump from seventh to second, just 0.053sec from Stoner.
Hayden was riding with a logo saying 'unforgettable 9 years' on the seat of his leathers, referring to the end of his long career as a Honda rider, which stretches back to AMA racing.
The leading Yamaha qualified in fourth position for Sunday's race - but it wasn't six time MotoGP world champion Valentino Rossi.
The Fiat Yamaha star, looking to reverse his last two nightmare appearances at Valencia, made a brief appearance on the provisional front row but looked to be struggling with rear traction problems and - prompted by the weather - had used up all of his qualifying tyres with five minutes still to go.
The Italian was left just tenth on the grid and thus faces a tough challenge if he is to end his eighth world championship winning season with a tenth victory.