Marquez, who has won the race for the past five years, set a time of 2mins 3.658sec, which was half a second ahead of Vinales.
However, the Honda rider will start fourth after getting penalised by race stewards for “slow riding on the racing line and disturbing another rider.”
“Qualifying was a bit hectic. I crashed and had to take my second bike for the second run. I went out, and unfortunately I didn’t expect Maverick to arrive behind me because I was focused on Andrea (Iannone), who was waiting ahead and who I knew could be very fast,” Marquez said.
“I apologised to Maverick but I didn’t realise he was behind me until I heard his engine. So tomorrow I’ll start from fourth.”
Iannone will start second ahead of French Yamaha rider Johann Zarco.
Championship leader Cal Crutchlow will start seventh ahead of Andrea Dovizioso who is second in the championship.