Defending champion Casey Stoner claimed his first pole position of the season ahead of Sunday's MotoGP race at Estoril.
The Australian rider followed up his Spanish Grand Prix victory by pipping Cal Crutchlow (Tech 3 Yamaha) on his final qualifying lap, clocking one minute 37.188 seconds, while Stoner's Honda team-mate Dani Pedrosa nipped in to take second late on.
Pedrosa was 0.013secs behind Stoner, with Crutchlow having to settle for third in 1min 37.289s.
Yamaha pair Jorge Lorenzo and Ben Spies were fourth and fifth respectively.
Most of the action came in the final 12 minutes when the session restarted after a short delay following a crash between Randy de Puniet and Colin Edwards at turn four.
Stoner went quickest only for Crutchlow to replace him at the top. The Australian had two laps to respond and did so on his second as he went 0.101 quicker than the Briton, with Pedrosa also jumping ahead of Crutchlow.
Alvaro Bautista, Andrea Dovizioso, Hector Barbera, Valentino Rossi and Nicky Hayden completed the top 10.
Lorenzo leads the championship standings by four points from Stoner.