The Spanish rider Dani Pedrosa continued his recovery from a broken collarbone by winning the German MotoGP ahead of compatriot Jorge Lorenzo and championship leader Casey Stoner.
Starting from second on the grid, Pedrosa was past pole-sitter and Honda teammate Stoner on the first bend.
However both defending champion Lorenzo and Stoner recovered to enjoy spells out in front but Pedrosa grabbed a decisive lead on lap 25.
The 25-year-old held on to win by one and a half seconds, his first victory since breaking his right collarbone at Le Mans two months ago.
Having missed three races as a result of the injury, Pedrosa has no chance of winning the world title.
However, Yamaha's Lorenzo remains with a real chance of retaining his crown after edging Stoner into second in a thrilling final lap, crossing the line less than a tenth of a second ahead of the Australian.
Lorenzo is now just 15 points behind Stoner in the standings.
Andrea Dovizioso finished over ten seconds behind the leading trio in fourth, and his fellow Italian and seven-time world champion Valentino Rossi recovered some pride at the end of a difficult weekend, claiming ninth place despite starting from 16th spot on the grid.
The world championship now moves to the United States for the next race at Laguna Seca next weekend.