At the start of the 11-lap race, the factory Ducatis shot to the front from polesitter Martin, with reigning champion Bagnaia taking the lead from team-mate Enea Bastianini.
KTM’s Brad Binder jumped from 14th on the grid to take fourth behind Martin, with Marc Marquez dropping a place to fifth.
Heading into lap three, Bastianini was trying to retake the second position he had lost to Martin when he went too deep at the exit of Turn 1.
As the Italian tried to return to the racing line he was hit by the Pramac Ducati of Martin, with the contact sending his factory-run GP24 sliding into the gravel.
The incident between the two Ducati riders was investigated, but both riders were cleared of any wrongdoing.
Bastianini’s exit gave Martin some breathing space for a few laps, but it didn’t take long for Marquez to close in on the points leader on his year-old GP23.
After a fruitless attempt on lap five, Marquez was finally able to complete a move going into the opening right-hander on the following tour to claim second.
Jorge Martin, Pramac Racing
Photo by: Gold and Goose / Motorsport Images
By this stage of the race, Bagnaia was already sitting 1.3s clear in first position, a seemingly large advantage with half the sprint already over.
But Marquez was able to bring the gap down by half a second with four laps to go, giving him a faint hope of victory in the closing stages of the race.
Ultimately, Bagnaia was able to break away from Gresini rival to claim his first sprint win since last year’s Austrian GP, ending his streak of poor Saturday results in 2024.
The final place on the podium went to GasGas Tech3 rookie Pedro Acosta, who was announced as a factory KTM rider for 2025 earlier on Saturday.
Acosta moved up to third place when Martin fell off his Pramac-run bike at the start of lap eight, his second major mistake of 2024 after his crash out of the lead of the Spanish Grand Prix in April.
Franco Morbidelli enjoyed his best result of 2024 on the sole-remaining Pramac Ducati bike, while Maverick Vinales was fifth on the top Aprilia after a sedate start from the front row.
Binder could only take sixth after his impressive start to the race, some four seconds off KTM stablemate Acosta, as Fabio Di Giannantonio guided his VR46 Aprilia to seventh place.
Alex Marquez (Gresini) and Aleix Espargaro (Aprilia) were classified eighth and ninth respectively, while Raul Fernandez completed the top 10 for Trackhouse.
Further behind, Jack Miller (KTM) and Marco Bezzecchi (VR46) took 11th and 12th respectively, while Yamaha’s Alex Rins recovered from a poor start that dropped him outside of the points to take 13th at the chequered flag.
Pol Espargaro took 14th on his wildcard outing for KTM, while LCR’s Johann Zarco was the only points scorer for Honda in 15th after factory rider Joan Mir crashed out.
Yamaha’s Fabio Quartararo was another former champion to retire from the sprint, the Frenchman’s race ending on lap two after Miguel Oliveira lost control of his Trackhouse Aprilia in front of him at Turn 10. The incident was investigated but no further action taken.
After his crash out of the sprint, Martin’s lead is now down to just 27 points over Bagnaia heading into Sunday’s grand prix.