Sandro Cortese scored his second pole position of the 2012 Moto3 campaign with an emphatic showing at Estoril.
The 22-year-old German had set the pace for much of the session, but with eight minutes to go was displaced at the top by Spain's Maverick Vinales.
Cortese was on his own flying run however and settled the battle with a 1m47.145s, sending him more than three tenths clear.
For a long while it appeared Britain's Danny Kent was set to join Cortese and Vinales on the front row, but as the chequered flag fell he was pushed down to fourth by home favourite Miguel Oliviera.
The Portuguese rider needed two efforts - the second his very final lap of the session to dislodge Kent, who nevertheless scored a career-best result of fourth.
He will share the second row with Malaysian Zulfahmi Khairuddin and current points leader Romano Fenati.
A measure of just how good Cortese's lap proved was the fact that Fenati, the youngest ever rider to lead the championship, finished more than 1s down.
It was an all-Spanish third row, with Luis Salom edging out Efren Vazquez and Hector Faubel.
Jerez polesitter Alex Rins finished way down the order in 22nd.