Takaaki Nakagami will start Sunday's Teruel Grand Prix in pole position after a brilliant performance in qualifying, though it was a frustrating day for MotoGP championship leader Joan Mir.

Nakagami became the first Japanese racer since Makoto Tamada in 2004 to clinch a premier class pole, as the LCR Honda rider produced a superb time of 1:46.882.

There was no such luck for Mir, who will start 12th on the grid in the second of back-to-back Aragon rounds, while fellow title challenger Andrea Dovizioso had to settle for 17th.

Nakagami, who this week signed a new two-year deal with LCR Honda, had topped the timesheets in practice and set the benchmark at the start of Q2, though Maverick Vinales (Monster Energy Yamaha) took over, with Alex Rins – the winner in last week's Aragon Grand Prix – then surpassing him.

Franco Morbidelli made a push for pole, but Nakagami improved his time on the final lap to finish ahead of the Petronas Yamaha rider by 0.063 seconds.

Rins ultimately dropped to third, but the Suzuki Ecstar rider is still in a strong position to target a second straight victory at the Aragon circuit.

Vinales tops the second row thanks to a brilliant effort on his final lap, while Johann Zarco, who crashed on the last corner of the session, is fifth.

Fabio Quartararo let his championship lead slip in dramatic fashion last time out, and he will start in sixth.

With Mir having his fastest lap cancelled, Dovizioso – who accepted in the build-up to the weekend that his title hopes are on the line – suffered his joint-worst qualifying result of the season on a dismal day for Ducati, with all four of their riders failing to make the cut for Q2.

Qualifying results

1. Takaaki Nakagami (LCR Honda) 1:46.882
2. Franco Morbidelli (Petronas Yamaha) +0.063s
3. Alex Rins (Suzuki Ecstar) +0.273s
4. Maverick Vinales (Monster Energy Yamaha) +0.359s
5. Johann Zarco (Esponsorama Racing) +0.415s
6. Fabio Quartararo (Petronas Yamaha) +0.444s
7. Cal Crutchlow (LCR Honda) +0.495s
8. Miguel Oliveira (Red Bull KTM Tech3 ) +0.627s
9. Pol Espargaro (Red Bull KTM Factory Racing) +0.637s
10. Alex Marquez (Repsol Honda) +0.721s
11. Iker Lecuona (Red Bull KTM Tech3) +0.739s
12. Joan Mir (Suzuki Ecstar) +0.760s