Marquez, who qualified sixth for his top-class debut, closed in on Pedrosa while on a flying lap with just over five minutes of QP2 remaining.
Pedrosa, unaware of Marquez's presence, remained on the racing line while the younger Spaniard attempted to overtake him; the pair narrowly avoiding contact.
Afterwards Marquez brushed off the moment as "nothing big".
"I was on my line and he closed the gap a little bit," he said.
"I think he didn't expect I was so close. For me it's not a problem. On the TV everyone told me it was so close, but from the bike it really wasn't so bad.
Like Marquez, Pedrosa spent most of the session outside of the top six, but made a major improvement on his final lap to jump up to third place, behind only the Yamahas of world champion Jorge Lorenzo and Cal Crutchlow.
Pedrosa said: "We were both together but then I did a quick lap to make sure I was on my own.
"But he was still there and at the corner I went on the inside and I wasn't so fast. I didn't expect him to be right there."
- Sports & Recreation