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
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.
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.
The Italian steered his Yahama through the Barcelona-Catalunya Circuit for a flying lap of 1 minute, 38.798 seconds.
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
Incredibly, Rossi managed to compose himself after the close call and after the race was restarted came home in fifth place.
Dovizioso avoided a string of crashes and narrow escapes notably that of Yamaha's Franco Morbidelli and Frenchman Johann Zarco.
It was the 24-year-old Binder's first MotoGP win in only his third race in the elite division, it was also a first victory at this level by a South African and for the KTM team.
MotoGP 2019: Valentino Rossi struggles in forgettable race, Fabio Quartararo bags Rookie of the Year award and other talking points from Japanese Grand Prix
It was a great day for young Quartararo, who finished second and clinched the much-deserved Rookie of the Year. Quartararo had a tyre advantage at the start by using the medium front, soft rear tyre combination. This allowed him to challenge Marquez (who was on both mediums) - but expectedly, he struggled at the end.
MotoGP world champion Marc Marquez will eye his tenth win of the season after snatching pole position on Saturday in Japan.
MotoGP 2019: Fabio Quartararo breaks Marc Marquez's record to become youngest rider to clinch pole position
Frenchman Fabio Quartararo snatched the first MotoGP pole position of his career when he edged Yamaha-SRT teammate Franco Morbidelli at Jerez.