Vinales, who trails Cortese by 29 points following his last-lap fall at Indianapolis, took the gamble to set his best time relatively early, giving the rest of the field plenty of time to try and beat it.
It appeared that would happen as the chequered flag flew when Cortese, helped along by a tow from fellow Ajo KTM rider Zulfahmi Khairuddin, was more than three tenths under the benchmark after the first two sectors.
The German lost his advantage in the final two splits however, eventually missing out on pole by 33 thousandths of a seconds.
Khairuddin, who earlier gained a massive tow from Cortese before they traded positions, will start from the final front row slot.
Gresini Honda's Niccolo Antonelli finished more than half a second down on Vinales but did enough to seal fourth ahead of Kalex-KTM pair Luis Salom (RW) and Hector Faubel (Aspar).
Several riders fell during the session, among them Romano Fenati (Italia FMI FTR-Honda) and Alex Marquez (Estrella Suter Honda).
The latter, three times a faller at Indianapolis, crashed twice, while Fenati dropped his bike early on while running fifth. He was able to rejoin but unable to improve, and will start from 13th.