Petrucci claimed just the second win of his career in the premier class, coasting home in the closing laps following a titanic tussle for much of the race.
Polesitter Fabio Quartararo slipped back in the early stages but did extend his overall lead in the championship standings by finishing ninth. Nearest rival Joan Mir had to settle for 11th place, with Maverick Vinales sandwiched between the pair.
Rain had delayed the start but, once proceedings began, Ducati riders dominated in the wet conditions, at one stage threatening a 1-2-3 result.
Petrucci, Andrea Dovizioso and Jack Miller were those involved at the head of the field, eventually joined by Suzuki Ecstar's Alex Rins to seemingly set the platform for a four-way battle to the finish.
However, Miller veered off the track with eight laps remaining, dropping him down the field. The Australian was forced to retire soon after, much to his obvious frustration once he returned to the pits.
Rins' hopes did not last much longer, as a slip at the first chicane effectively ended his bid for victory. While able to get back on the bike and resume racing, he finished 16th.
The sudden developments cleared the way for Petrucci - who is heading to KTM next year - to become the seventh different rider to win in the 2020 season, a much-needed success in what has been an otherwise difficult year for the Italian.
Marquez, meanwhile, produced a dazzling ride to move from his starting position at the back of the pack to second, easily his best result in a debut campaign for a Repsol Honda team minus the services of his injured brother, Marc.
- Danilo Petrucci (Ducati)
- Alex Marquez (Repsol Honda) +1.273s
- Pol Espargaro (Red Bull KTM Factory Racing) +1.711s
- Andrea Dovizioso (Ducati) +3.911s
- Johann Zarco (Esponsorama Racing) +4.310s
- Miguel Oliveira (Red Bull KTM Factory Racing) +4.466s
- Takaaki Nakagami (LCR Honda) +5.921s
- Stefan Bradl (Repsol Honda) +15.597s
- Fabio Quartararo (Petronas Yamaha) +16.687s
- Maverick Vinales (Monster Energy Yamaha) +16.895s
- Fabio Quartararo (Petronas Yamaha) 115
- Joan Mir (Suzuki Ecstar) 105
- Andrea Dovizioso (Ducati) 97
- Maverick Vinales (Monster Energy Yamaha) 96
- Takaaki Nakagami (LCR Honda) 81
- Petronas Yamaha 192
- Suzuki Ecstar 165
- Ducati 161
- Monster Energy Yamaha 154
- Red Bull KTM Factory Racing 135
The rearranged season heads back to Spain next weekend for the Aragon Grand Prix, the first of two races to be held at MotorLand.