Misano - Spaniard Dani Pedrosa will start from pole position in Sunday's San Marino MotoGP after qualifying fastest on Saturday.
The 26-year-old Honda rider - taking his 41st career pole spot and his 23rd in MotoGP - was 0.018 of a second quicker than 2010 champion and compatriot Jorge Lorenzo on a Yamaha while Briton Cal Crutchlow will start from third spot as he finished 0.0144 of a second slower.
Pedrosa trails Lorenzo by 13 points in the overall standings after 12 races.
Pedrosa posted the early leading time on the fourth lap but was only able to confirm his fourth pole of the campaign in the dying seconds as first Crutchlow and then Lorenzo timed faster.
However, Pedrosa, who has never won the MotoGP title but was the youngest ever 250cc world champion aged just 19 in 2004, deprived Lorenzo of pole with a final surge in the last part of the circuit.
Italian nine-time world champion Valentino Rossi equalled his best qualifying performance of the season in taking sixth in what is his final race on home soil for the Ducati team before rejoining Yamaha.
Jonathan Rea posted the ninth quickest time in what is his first race deputising for Honda's defending world champion Casey Stoner, who is recovering after intensive leg surgery and will retire at the end of the season.
Grid for Sunday's San Marino MotoGP after qualifying on Saturday:
1. Dani Pedrosa (ESP/Honda) 1min 33.857sec
2. Jorge Lorenzo (ESP/Yamaha) at 0.018sec
3. Cal Crutchlow (GBR/Yamaha) 0.144
4. Stefan Bradl (GER/Honda) 0.364
5. Alvaro Bautista (ESP/Honda) 0.442
6. Valentino Rossi (ITA/Ducati) 0.762
7. Andrea Dovizioso (ITA/Yamaha) 1.059
8. Ben Spies (USA/Yamaha) 1.131
9. Jonathan Rea (GBR/Honda) 1.501
10. Nicky Hayden (USA/Ducati) 1.544
11. Karel Abraham (CZE/Ducati) 1.791
12. Randy de Puniet (FRA/Aprilia) 1.899