An opening-lap crash from the lead of the Indonesian Grand Prix sprint halved Jorge Martin's MotoGP points lead, as title rival Pecco Bagnaia eased to victory instead.
It means Bagnaia is now 12 points behind Martin instead of 24.
Martin had dominated qualifying with a lap record and kept the lead off the line.
But Bagnaia immediately moved up to second on the outside of Turn 1 and stayed with Martin over the opening lap. Then he was suddenly faced with a clear track as Martin fell off at the treacherous slow Turn 16.
It set up a straightforward task for Bagnaia from there, yet he found himself shadowed closely by the 2023-spec Ducatis of Marco Bezzecchi and Marc Marquez (up from 12th after yet another Q2 crash - two of them in fact).
Bezzecchi came ever-so-close to wiping Bagnaia out while in pursuit, losing rear tyre contact on entry into Turn 10 and having to basically bail out of the corner to avoid clattering into his good friend and fellow VR46 Academy rider.
Bezzecchi's error promoted Marquez to second and dropped him to fourth behind Enea Bastianini, whose late-race pace soon made it a three-bike leading pack again.
Bastianini's late-race pace proved inspired, as he cleared Marquez on the penultimate lap - but that fight gave Bagnaia enough of a buffer, the reigning champion winning by 0.107s despite his Ducati team-mate closing by seven tenths on the final lap.
Marquez completed the podium, followed by Bezzecchi and Franco Morbidelli - whose race was hampered by failed attempts to overtake Pedro Acosta and contact with Fabio Quartararo before he finally did clear Acosta on the final lap.
Acosta ran third early on but had to settle for sixth in the end, as the only KTM/Gas Gas points-scorer.
He was followed across the line by Aprilia's Maverick Vinales and LCR Honda's Johann Zarco, likewise the only points-scorers for their respective manufacturers.
The still-injured Fabio Di Giannantonio came home in ninth, making it six Ducatis that scored points.
Martin did remount after his Turn 16 fall, and charged through the pack in the remaining laps, but came up one place short of scoring points.
The other riders who crashed included Raul Fernandez (who also remounted), Joan Mir and Augusto Fernandez.
SPRINT RESULT
1 Pecco Bagnaia (Ducati)
2 Enea Bastianini (Ducati)
3 Marc Marquez (Gresini Ducati)
4 Marco Bezzecchi (VR46 Ducati)
5 Franco Morbidelli (Pramac Ducati)
6 Pedro Acosta (Tech3 GasGas)
7 Maverick Vinales (Aprilia)
8 Johann Zarco (LCR Honda)
9 Fabio di Giannantonio (VR46 Ducati)
10 Jorge Martin (Pramac Ducati)
11 Jack Miller (KTM)
12 Fabio Quartararo (Yamaha)
13 Brad Binder (KTM)
14 Alex Marquez (Gresini Ducati)
15 Alex Rins (Yamaha)
16 Aleix Espargaro (Aprilia)
17 Taka Nakagami (LCR Honda)
18 Luca Marini (Honda)
19 Raul Fernandez (Trackhouse Aprilia)
DNF Augusto Fernandez (Tech3 GasGas)
DNF Joan Mir (Honda)