Nine-time world champion out-paces Iannone and Pedrosa.
The MotoGP Q2 session saw Valentino Rossi grab pole at the Gran Premio Generali de la Comunitat Valenciana, with Andrea Iannone and Dani Pedrosa also taking front row slots.
The session also saw Marc Marquez suffer a turn four crash without consequence, though he ended up fifth on the grid.
In what has been a great season for Rossi with the Italian raising his performance levels again, the Movistar Yamaha MotoGP rider achieved his 50th career pole in the premier class and his first since Le Mans 2010 with a 1m30.843 lap at the end of Q2.
The pole position gives Rossi the edge over his colleague Jorge Lorenzo in the battle for second in the championship on Sunday.
Iannone (Pramac Racing) looked to be on course for his first pole in MotoGP, but was beaten by Rossi by 0.132s as the session closed. Pedrosa (Repsol Honda Team) will get away from third on the grid having qualified 0.156s behind Rossi.
Lorenzo (Movistar Yamaha MotoGP) heads row two and is sure to push hard in the race to beat Rossi, at a track where the Spaniard won last year. A crash for Marquez (Repsol Honda Team) mid session left him in fifth, his worst grid position since Barcelona-Catalunya last year.
Pol Espargaro (Monster Yamaha Tech3) completes the second row as he seeks to clinch sixth in the championship in his rookie season.
Bradley Smith (Monster Yamaha Tech3), Cal Crutchlow (Ducati Team) and Andrea Dovizioso (Ducati Team) will line up on row three.
Stefan Bradl (LCR Honda MotoGP), Aleix Espargaro (NGM Forward Racing) and wild card Michele Pirro (Ducati Team) will line up on the fourth row, with Bradl and Pirro having made it through from Q1.