Montmelo - Spain's Dani Pedrosa, on a Honda, took pole position for Sunday's Catalunya MotoGP as he finished ahead of Yamaha rider Jorge Lorenzo and teammate Marc Marquez, the championship leader, on Saturday.
It was the 45th pole position for the former 250cc world champion and his 26th in MotoGP as he timed 1min 40.985sec to outpace compatriots Lorenzo, by 0.115sec, and Marquez, who is chasing a seventh straight victory, by 0.150sec.
Pedrosa's performance ended the pole position winning streak of Marquez, who walked away from a crash towards the end of the session, and will be the first time since Motelgi last year Marquez will not start at the front of the grid.
Marquez became the first rider since Italy's Valentino Rossi in 2002 to win six successive races, when he edged out Lorenzo at the Italian Grand Prix at Mugello on June 1.
He will carry a healthy 53-point lead over Rossi into Sunday's race at the Montmelo circuit while Pedrosa is just one point further back in the championship standings.
Germany's Stefan Bradl will lead the second row as he finished fourth fastest at 0.235sec on a Honda LCR, with Rossi alongside him, 0.305sec slower than Pedrosa.
Another Spaniard, Aleix Espargaro, who was fastest in Friday's practice on his Yamaha Forward, completes the second row.
In qualifying for the Moto2 Grand Prix, Spain continued to dominate the weekend as Esteve Rabat rode his Kalex bike to pole position.
The championship leader recorded his fifth pole of the season, and led home Finnish team-mate Mika Kallio by 0.571secs with fellow-Spaniard Maverick Vinales completing the front row 0.623sec back, also on a Kalex.
Earlier, Marquez's younger brother Alex set a course record as he rode his Honda to pole position for the Moto3 Grand Prix with a time of 1min 50.232sec.
The 18-year-old finished his fastest lap a comfortable 0.618sec quicker than Italian KTM rider Enea Bastianini.
Spaniard Alex Rins, on a second Honda, was a further 0.062sec back to round out the top three.
Starting grids for the Catalunya motorcycling Grand Prix meeting after qualifying on Saturday at Montmelo:MotoGP
1. Dani Pedrosa (ESP/Honda) 1min 40.985sec, 2. Jorge Lorenzo (ESP/Yamaha) at 0.115sec, 3. Marc Marquez (ESP/Honda) 0.150, 4. Stefan Bradl (GER/Honda LCR) 0.235, 5. Valentino Rossi (ITA/Yamaha) 0.305, 6. Aleix Espargaro (ESP/Yamaha Forward) 0.323, 7. Andrea Dovizioso (ITA/Ducati) 0.352, 8. Bradley Smith (GBR/Yamaha Tech3) 0.506, 9. Yonny Hernandez (COL/Ducati Pramac) 0.686, 10. Pol Espargaro (ESP/Yamaha Tech3) 0.692, 11. Andrea Iannone (ITA/Ducati Pramac) 0.766, 12. Alvaro Bautista (ESP/Honda Gresini) 1.039
Moto2
1. Esteve Rabat (ESP/Kalex) 1min 46.569sec, 2. Mika Kallio (FIN/Kalex) at 0.571sec, 3. Maverick Vinales (ESP/Kalex) 0.623, 4. Sandro Cortese (GER/Kalex) 0.698, 5. Jonas Folger (GER/Kalex) 0.875, 6. Mattia Pasini (ITA/Kalex) 0.957, 7. Thomas Luthi (SUI/Suter) 1.025, 8. Johann Zarco (FRA/Caterham Suter)1.026, 9. Sam Lowes (GBR/Speed Up) 1.031, 10. Dominique Aegerter (SUI/Suter) 1.035, 11. Luis Salom (ESP/Kalex) 1.096, 12. Franco Morbidelli (ITA/Kalex) 1.219
Moto3:
1. Alex Marquez (ESP/Honda) 1:50.232 (track record), 2. Enea Bastianini (ITA/KTM) at 0.618sec, 3. Alex Rins (ESP/Honda) 0.680, 4. Brad Binder (RSA/Mahindra) 0.792, 5. Niklas Ajo (FIN/Husqvarna 1.076, 6. Isaac Vinales (ESP/KTM) 1.128, 7. Miguel Oliveira (POR/Mahindra) 1.224, 8. Efren Vazquez (ESP/Honda) 1.239, 9. Jack Miller (AUS/KTM) 1.249, 10. John McPhee (GBR/Honda) 1.267, 11. Jakub Kornfeil (CZE/KTM) 1.435, 12. Niccolo Antonelli (ITA/KTM) 1.461