The German pushed the pace early on, determined to capitalise on a qualifying in which he had sealed pole and Vinales, his nearest rival, struggled to 11th.
Initially his advantage was huge, as Vinales was hung out at the start and slipped as low as 17th.
Rather than spell disaster, however, that precipitated a brave response from Vinales, who fought his way back up the order and eventually made contact with a lead group of six other riders from which the Ajo KTM of Cortese had been unable to escape.
Jerez racewinner and home favourite Romano Fenati (Italia FMI FTR-Honda) gave Vinales's hopes a further boost by displacing Cortese at the front of the field and leading the majority of the race.
With six laps to go Alex Rins also passed Cortese, and with Vinales (Avintia FTR-Honda) up to fourth the championship's chief protagonists were together for the first time.
Vinales would drop back again, with Cortese moving in the opposite direction back to the front, but with two laps to run he charged again and moved into third.
Now locked with Cortese and Luis Salom, Vinales stole second on the final lap but stumbled at the final hurdle, losing momentum when he looked for an inside line Cortese was easily able to close off.
That not only allowed Cortese breathing space through the final turns, it dropped Vinales back into the clutches of the chasing pack.
Salom (RW Kalex-KTM) was the first to pick him off, but at the final turn Alex Rins - on his own charge, having started 17th - also forced his Monlau Honda down the inside of Vinales.
As the pair squabbled, Fenati was able to steal ahead on the exit to snatch third.
Finishing fifth as a result, Vinales now trails Cortese by 48 points heading into the final five races.