Marquez said he was ready to "suffer" in his first race since sustaining a season-ending broken arm last July, but the six-time MotoGP™ champion enjoyed an encouraging comeback after making an early move from sixth to third.
However, it was Quartararo who took the victory, despite dropping down the field from pole position in a pulsating start, after Johann Zarco and Alex Rins crashed out in quick succession at the Algarve International Circuit on Sunday.
Maverick Vinales could only finish back in 11th place on a great day for Quartararo.
Zarco darted up the inside in a dream start from third on the grid to take the lead from Monster Energy Yamaha rider Quartararo, with Marquez also impressing during the opening laps in Portimao.
Quartararo dropped back to sixth and Marquez caught the back of Mir's Suzuki as he slipped back following a promising beginning to the race.
Quartararo had ominously put a disappointing start behind him to apply the pressure, becoming the latest leader of the race with 17 laps to go.
Rins tried his best to cut the gap in second place but spun off 11 laps from the end at Turn 10 after Valentino Rossi had crashed out from 11th place.
Quartararo was in complete control when Rins spun and a second-placed Zarco hit the deck, with Ducati rider Bagnaia holding off Mir for second, having been back in 11th, as the early championship lead changed hands.
- Fabio Quartararo (Monster Energy Yamaha)
- Francesco Bagnaia (Ducati) +4.809
- Joan Mir (Suzuki Ecstar) +4.948
- Franco Morbidelli (Petronas Yamaha SRT) +5.127
- Brad Binder (Red Bull KTM Factory Racing) +6.668
- Aleix Espargaro (Aprilia) +8.885
Marc Marquez (Repsol Honda) +13.208
- Alex Marquez (LCR Honda Castrol) +17.992
- Enea Bastianini (Esponsorama Racing) +22.369
- Takaaki Nakagami (LCR Honda Idemitsu) + 23.676
- Fabio Quartararo (Monster Energy Yamaha) 61
- Francesco Bagnaia (Ducati) 46
- Maverick Vinales (Monster Energy Yamaha) 41
- Johann Zarco (Pramac Racing) 40
- Joan Mir (Suzuki Ecstar) 38
- Monster Energy Yamaha 102
- Suzuki Ecstar 61
- Ducati 60
- Pramac Racing 57
- Aprilia 27
Quartararo goes in search of three wins on the spin at the Spanish Grand Prix on the first weekend in May, with Marquez back on home soil.