World champion Casey Stoner overcame handling problems, a heavy practice fall and qualifying showers to take a surprise pole position for the Dutch MotoGP at Assen.
The Australian shot from ninth to third with just minutes remaining, then blasted to the top by half-a-second from Repsol Honda team-mate Dani Pedrosa on his penultimate lap.
Title leader Jorge Lorenzo briefly knocked Pedrosa from second, but the #26 retaliated to seal an RCV one-two by closing to within 0.115s of Stoner.
Honda LCR rookie Stefan Bradl provided a final surprise by jumping into fourth place, aided by a last-lap tow from Valentino Rossi.
Stoner had struggled to tenth place with chatter problems on Thursday afternoon, before suffering a punishing highside - "one of the biggest in my career and certainly one of the most painful" - due to a rain shower in Friday morning's final practice session.
Rain was again a threat from the start of qualifying, prompting flat out action from the off.
MotoGP title leader Lorenzo got off to a flying start by setting his best lap of the event in the opening five minutes, then posting further successive improvements.
But practice pace setter Pedrosa was also on a charge, matching Lorenzo's improvements before finally leap-frogging his fellow Spaniard to take provisional pole after twelve minutes of the hour.
And then the rain spots arrived, initially sending all 21 riders back to the pits. The moisture continued off and on for most of the session, containing lap times until a window of opportunity opened in the closing minutes.
Stoner explained that his dramatic end-of-session improvement had also been down to switching from the harder rear tyre, which he has struggled to make work, to the softer rear tyre.
"It was certainly a lap that surprised us. The pace is there we just need to make sure we can last the race," he said.