Spanish rookie Jorge Martin, the teammate of Zarco, was third after starting the race on pole position.
Francesco Bagnaia on another Ducati came third on his first ride in the factory team after starting on pole, beating reigning champion Joan Mir of Suzuki back into fourth in the final moments of the race
MotoGP 2021: Ducati's Francesco Bagnaia takes first pole of season in Qatar pipping Fabio Quartararo
Another Yamaha rider, Spaniard Maverick Vinales completed the front row after nudging out Italian veteran Valentino Rossi of Yamaha satellite team SRT, late in the session.
Manufacturers Honda, Ducati and KTM have also signed on with Moto GP until 2026.
Oliveira followed up his maiden victory in Styria in August by taking the title at Portimao in what was his first race in the premier class in his home country.
Valentino Rossi will be bringing the curtain down on his 15-year factory Yamaha MotoGP career in the final race of the season in Portugal on Sunday.
Pole-sitter Franco Morbidelli won the race for this third victory of the season, but it was not enough to keep Mir from securing the title with one race to go
Championship leader Joan Mir, who like Espargaro has never won in the premier division, will start from the second row.
Seven-time world MotoGP champion Rossi made his comeback for Yamaha having missed back-to-back races at MotorLand Aragon last month after testing positive for COVID-19.
Teruel MotoGP: Franco Morbidelli wins after Takaaki Nakagami crash; Joan Mir stays in championship lead
Morbidelli crossed the finish line more than two seconds ahead of Álex Rins, with Joan Mir coming in third place after starting 12th.
Alex Rins sliced through the field after starting 10th on the grid. He became the 8th winner in this season's ten races after the vacuum created by the early season injury to reigning champion Marc Marquez.
Flung over his twisting machine MotoGP championship leader Fabio Quartararo hit the track hard, sliding tens of metres before finally coming to a rest in the safety gravel.
MotoGP 2020: Fabio Quartararo crashes in Aragon MotoGP opening practice, Valentino Rossi to miss race after positive COVID-19 test
With six-time champion Marquez out of the running a new name will be engraved on the coronavirus-disrupted 2019 MotoGP season, with Quartararo narrowly out in front but only 19 points cover the top four riders.
MotoGP 2020: Yamaha's Maverick Vinales wins Emilia-Romagna MotoGP to within one point of championship lead
The young Italian led by a second and a half at one stage and was still on course for a first victory for himself and Ducati-Pramac when he leant a bit too far unto a corner with seven laps to go and slid off.
In last weekend's San Marino Grand Prix, Maverick Vinales, who rides for Yamaha, could not capitalise and finished sixth.
MotoGP 2020: Franco Morbidelli wins maiden race at San Marino as Andrea Dovizioso takes championship lead
Yamaha SRT's Morbidelli, who started second on the grid, overtook pole sitter Maverick Vinales on the first lap and never relinquished his lead
Dovizioso avoided a string of crashes and narrow escapes notably that of Yamaha's Franco Morbidelli and Frenchman Johann Zarco.
Vinales, who sits second in the overall standings ahead of Sunday's fourth race of the campaign, clocked one minute, 23.450 seconds to finish 0.068sec ahead of Ducati-Pramac's Jack Miller.
MotoGP 2020: Fabio Quartararo cruises to his second consecutive victory of season at Andalucia Grand Prix
Quartararo cruised to victory a week after earning his maiden MotoGP race in Jerez de la Frontera. The 21-year-old Yamaha rider opened a 10-point lead over Maverick Viñales in the championship standings.
MotoGP 2020: Reigning champ Marc Márquez returns to circuit after surgery but won't race at Andalucia GP
Márquez injured his arm last Sunday when he crashed near the end of the Spanish GP, the first race since the coronavirus pandemic