A late 1m29.074s on the hard tyre mandated for the race put Pedrosa on top by 0.048 seconds.
Shortly beforehand, Marquez had grabbed first place from Jorge Lorenzo as he got back up to speed following his second crash of the weekend.
The championship leader had a low-speed fall at MG corner but was swiftly able to resume.
Toby Moody: Pedrosa bites back
Just 0.161s covered the leading five riders at the flag.
Behind the Honda one-two, Yamaha's Valentino Rossi and Gresini Honda's Alvaro Bautista set identical late laps, 0.118s off the pace, to push Lorenzo down to fifth.
Bradley Smith and Nicky Hayden took sixth and seventh as they secured their places in Q2, with Smith's Tech 3 team-mate Cal Crutchlow next up.
Two CRT riders also made the pole shootout, with Colin Edwards and Randy de Puniet flying to ninth and 10th in the session, overshadowing usual class pacesetter Aleix Espargaro.
Bar Hayden's time, it was a poor morning for Ducati. Factory rider Andrea Dovizioso was only 11th and will have to go through Q1, as will both Pramac riders. Yonny Hernandez was also the session's second crasher with a similar fall to Marquez.
- Sports & Recreation
- Motor Racing
- Jorge Lorenzo
- Nicky Hayden
- Gresini Honda