The factory Ducati rider converted pole position into a comfortable victory after seeing two of his closest rivals crash out. Younger brother Alex Marquez, who had pressured him in the opening laps, crashed on lap 10, while VR46 Racing's Fabio Di Giannantonio - seen as one of Marc's biggest threats after qualifying third and finishing on Saturday's sprint podium - also failed to finish.
The win was Marquez's 10th premier-class victory at Sachsenring, drawing him level with Giacomo Agostini's record at a single circuit. Once Alex exited, the Spaniard controlled the race from the front and was never seriously challenged.
"I am super happy. It was a special weekend," Marquez said after his win.
"I was super concentrated because I knew if I wanted to have a crack at the championship, I needed to win here."
Ai Ogura passed Trackhouse Racing teammate Raul Fernandez late in the race to finish second, less than two seconds behind Marquez. The Japanese rider became the first from his country since 2002 to secure three successive premier-class podiums, with Fernandez coming in third.
The victory lifted Marquez to third in the standings, four points ahead of former championship leader Marco Bezzecchi. The Italian was ruled out of the race after fracturing his left collarbone in a heavy qualifying crash, with Aprilia saying on Sunday that he had undergone successful surgery but faced an uncertain recovery timeline.
Ogura climbed to second in the standings, four points clear of Marquez. Championship leader Jorge Martin extended his advantage at the top, 14 ahead of Ogura. Martin finished fifth behind KTM's Pedro Acosta.
"I am so happy about today. It was a better Sunday than I expected," Ogura said.
"It was really tough to overtake Raul, but I managed to pass him and finished second."
Marquez had trailed the championship lead by 102 points after last month's Italian Grand Prix. But with victories in Hungary, Czechia and Germany, coupled with Bezzecchi's run of four races without points, the Spaniard has pulled himself back into contention halfway through the season.
Di Giannantonio, who began the weekend 13 points off the championship lead, saw his hopes of taking over at the top end with a crash in the race, compounding an earlier fall in warm-up. He slipped to fifth in the standings.
