Sandro Cortese became the first German to win a grand prix race at the Sachsenring in more than 13 years after defeating Alexis Masbou in a mixed-weather thriller.
A torrential downpour delayed the start of the race and ensured conditions were extremely wet when it did finally begin, but the rain quickly abated and by the end a clear dry line had emerged across the circuit.
The changing conditions effectively split the race into several stages, with both Cortese (Ajo KTM ) - who had started from pole - and Masbou (Caretta Honda) outside the top six for the first handful of laps.
As the weather eased however both started to fly. Masbou passed Cortese for sixth and both began to charge, closing a six second deficit to the lead pack of five riders within two laps.
One lap later and Masbou had scythed his way through into the lead, with Cortese following suit to move into second. The latter's team-mate Jack Miller, Louis Rossi (Germany FTR-Honda), Adrian Martin (Laglisse Honda), Luis Salom (RW Kalex-KTM) and Brad Binder (RW Kalex-KTM) were their victims.
The pair's surge sparked a now seven-way battle for the lead, the top group often covered by less than 1.5s, but as conditions continued to improve their pace eventually told, with only Salom able to stay with them.
In their attempts to keep the pace, and on wet tyres now struggling on the dry line, Binder and Rossi were both late casualties.
Cortese gained some breathing space by setting a new fastest lap on his penultimate tour, while the race's overall best on his final tour allowed him to eventually claim victory, and with it the championship lead erstwhile leader Maverick Vinales' miserable weekend complete as he finished just 17th.
Masbour followed him home to record his first ever grand prix podium, while Salom just held off a resurgent Miller for third five hundredths all that separated them at the flag.
Vazquez (Laglisse Honda), Zulfahmi Khairuddin (Ajo KTM) and Hector Faubel (Aspar Kalex-KTM) completed the top seven. The latter fought his way back after having to start from the pitlane when he stalled on the grid.