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.
Sunday's race, held in front of empty stands due to the pandemic, provides Morbidelli with a chance to clinch second place in the world championship behind Mir.
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
MotoGP 2020: Australian Jack Miller tops Valencia MotoGP practice, championship leader Joan Mir crashes
Mir suffered a late blip at the Ricardo Tormo circuit when he came off at Turn 4 with 11 minutes to go, an error that saw him drop to 11th in the standings.
Marquez, 27, had won the title four years in a row but has been sidelined since crashing out of the Spanish Grand Prix in Jerez on 19 July.
MotoGP rider Andrea Iannone's doping ban extended to four years by CAS after failing to prove innocence
The Court of Arbitration for Sport said its three judges dismissed the Italian rider’s appeal against an 18-month ban and upheld the World Anti-Doping Agency’s counter appeal requesting a four-year sanction.
Mir took advantage of title rival Fabio Quartararo's first-lap crash while compatriot Alex Rins ensured a one-two finish for Suzuki, the first for the Japanese manufacturer since 1982.
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.
MotoGP: Yamaha names Garrett Gerloff as standby for COVID-19 positive Valentino Rossi at Valencia GP
Rossi, 41, who has featured in just five of the season's 11 Grand Prixs to date, will be replaced by American Garrett Gerloff if he fails to return two negative tests, 48 hours apart, ahead of the race.
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.
MotoGP 2020: Takaaki Nakagami grabs maiden pole in Teruel GP qualifying, championship leader Joan Mir in 12th
The 28-year-old Nakagami, who signed a new deal with Honda's satellite team earlier this week, posted a fastest lap of one minute and 46.882 seconds.
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.
The 41-year-old Rossi has to complete a 10-day quarantine and test negative before he can return to the circuits.
MotoGP 2020: Championship leader Fabio Quartararo claims pole at Aragon GP despite suffering nasty crash in practice
Quartararo displayed the single-mindedness and poise worthy of a world champion to even take part in qualifying after his second fall of the race weekend, let alone top the timesheets at the Aragon Motorland circuit.
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.
The 41-year-old Italian said he could also miss next week's Teruel Grand Prix at the same circuit in Spain.
MotoGP 2020: Ducati's Danilo Petrucci vrooms to victory at Le Mans as Fabio Quartararo retains championship lead
At the rain-hit French MotoGP at Le Mans, Danilo Petrucci, riding for Ducati, won for only the second time from 146 MotoGPs.
Joan Mir came through to take second and is now eight points behind Fabio Quartararo in the standings while Alex Rins completed the podium.
In last weekend's San Marino Grand Prix, Maverick Vinales, who rides for Yamaha, could not capitalise and finished sixth.