Marc Marquez was pushed all the way by Jonas Folger but proved his mastery of the Sachsenring to win the MotoGP German Grand Prix for the fifth year in a row to take top spot in the title race.
Marquez has now won from pole in Germany in each of the past eight seasons across all classes - a run that has extended into all five of his MotoGP campaigns.
The reigning champion again led them away on Sunday, but was in a class of two as Folger kept the Monster Yamaha Tech 3 at pace with the Repsol Honda throughout.
A pair of errors into Turn One allowed Marquez through on Folger, who had delighted the home fans by leading a portion of the race, and then consolidated his advantage as the rookie tried to fight back later on.
Dani Pedrosa rode a lonely race for third place, having been dropped early on by team-mate Marquez and Folger.
Behind them, Maverick Vinales ousted Valentino Rossi and Andrea Dovizioso in a battle for fourth place that contained three of the four front runners in the title race - but that trio were left to squabble with each other while Marquez reigned supreme to supersede them all - although the leading quartet are now separated by just 10 points in a thrilling championship fight.
Marquez's belligerent bravery has been pivotal to his success in the premier class, but ice ran through his veins here.
A pre-race focus translated to a calm performance, as Marquez refused to bite back on Folger after being passed on lap six.
Instead the 'King of the Ring' bided his time, sticking to the rookie's rear tyre and waiting for him to overrun into Turn One.
Folger stuck to the back of Marquez for the remainder of the race, but it did nothing to unsettle the Spanish star who delivered a flawless performance.
FOLGER ANNOUNCES HIMSELF
Folger briefly had home fans dreaming of only a second ever German win in this event, but he had to succumb to Marquez in the end.
Johann Zarco has hogged most of the headlines in Monster Yamaha Tech 3's all-rookie lineup, which has taken the fight to some of MotoGP's star names this year.
But it was Folger's time to shine on Sunday and a maiden podium finish was backed up by a hot lap of one minute 21.442 seconds - a new Sachsenring lap record.
VINALES RECOVERY KEEPS MARQUEZ IN CHECK
After a blistering start to the campaign, Maverick Vinales had seen his championship lead snatched away by Andrea Dovizioso, but the Yamaha man showed he remains up for the fight.
Starting 11th on the grid after a Saturday full of Yamaha struggles, Vinales carved his way through the field to snatch an impressive fourth place, comfortably passing Dovizioso and team-mate Valentino Rossi on the way.
IN THE POINTS
1. Marc Marquez (Repsol Honda) 40:59.525
2. Jonas Folger (Monster Yamaha Tech 3) +3.310
3. Dani Pedrosa (Repsol Honda) +11.546
4. Maverick Vinales (Yamaha) +14.253
5. Valentino Rossi (Yamaha) +14.980
6. Alvaro Bautista (Aspar) +16.534
7. Aleix Espargaro (Aprilia) +19.736
8. Andrea Dovizioso (Ducati) +20.188
9. Johann Zarco (Monster Yamaha Tech 3) +21.138
10. Cal Crutchlow (LCR Honda) +24.210
11. Jorge Lorenzo (Ducati) +25.659
12. Danilo Petrucci (Octo Pramac Racing) +31.540
13. Pol Espargaro (KTM Factory Racing) +32.179
14. Bradley Smith (KTM Factory Racing) +36.453
15. Jack Miller (Marc VDS) +37.771
1. Marc Marquez (Repsol Honda) - 129
2. Maverick Vinales (Movistar Yamaha) - 124
3. Andrea Dovizioso (Ducati) - 123
4. Valentino Rossi (Movistar Yamaha) - 119
5. Dani Pedrosa (Movistar Yamaha) - 103
The machines will be packed away for five weeks as MotoGP takes a mid-season break before returning in Brno next month - scene of Cal Crutchlow's maiden premier-class victory a year ago.