Casey Stoner will start his final Catalunya MotoGP from pole position after edging out title rival and home favourite Jorge Lorenzo by 0.146s during a scorching qualifying session.
The pole is Stoner's 40th in grand prix and second of the year, while championship leader Lorenzo makes his return to the front row for the first time since round two at Jerez.
Joining them on the front row will be Cal Crutchlow, who qualified in the top three for the third time this season for Tech 3 Yamaha.
The big loser from Saturday's session was Spaniard Dani Pedrosa, fastest in morning practice, who ran off in the closing minutes after getting his Repsol Honda sideways under braking.
The former Catalan winner will start his home round from fifth position, albeit only 0.361s from pole.
Alongside Pedrosa on row two will be Factory Yamaha's Ben Spies (fourth) and Tech 3's Andrea Dovizioso (sixth). Dovizioso, Crutchlow and Pedrosa all featured on pole in the final 20 minutes.
Having run the harder tyre for much of the weekend, reigning champion Stoner - who plans to retire at the end of this season - naturally received a speed boost by switching to the softer tyre for his time attack in the closing stages.
The Australian set pole with nine minutes of the hour remaining, his 1m 41.295s lap just a fraction behind his own pole record set with qualifying tyres in 2008.
While others - especially the Yamaha riders - have spent large amount of time on the softer tyre, Stoner feels it could drop off significantly during the race and is confident his focus on the harder option is the correct approach.
Sunday's race could thus feature the greatest tyre variation of any round so far.
The Tech 3 Yamahas seem certain to race the soft option, while Lorenzo - who starts round five with an eight point advantage over Stoner - appears open to both options.