The season-opener was action-packed from the outset, with a huge train of bikes fighting for the lead throughout, before a final-lap showdown between Marquez, Thomas Luthi and Andrea Iannone.
Poleman Luthi had led at first, before being attacked by Pol Espargaro starting lap two. Both ran a little wide, allowing Marquez to slip through into the lead, as Luthi started a temporary slump down the order.
Espargaro, Iannone and Marquez then swapped the lead for a while, although the latter pair made life harder for themselves by running wide at Turn 1 on consecutive laps around half-distance and losing several places.
That gave Espargaro another shot at leading, until Luthi worked his way back to the front on lap 14.
Marquez was soon back on Luthi's tail, with Iannone right behind them. It seemed as though Marquez was biding his time, and sure enough he attacked starting the final lap, edging Luthi onto the kerb and sending him very wide.
Iannone capitalised and briefly claimed the lead, but Marquez was able to slipstream back past on the run to the finish line, claiming victory in his comeback race by just 0.061 seconds.
Espargaro beat Esteve Rabat to the final podium position, with Luthi only able to salvage fifth.
Scott Redding battled through to sixth, just ahead of Mike di Meglio and Simone Corsi.