South African Brad Binder won his first MotoGP in only his third race with victory in this season's third round in the Czech Republic.
Italian Franco Morbidelli took the lead at the start and built up a gap of just over a second.
Binder overtook Frenchman Fabio Quartararo to go second before passing Yamaha satellite rider Morbidelli.
"This is a day I dreamt of since I was a little boy," said Binder, whose win was also a first for his KTM team.
"I wish my parents were here because they are the ones that backed me from the beginning.
"I can't thank my team enough because they put an absolute insane motorbike underneath me. I had no idea we were capable of winning but I had a feeling it could be good.
"I hope this is the start of many more."
Morbidelli achieved his first podium finish with second place, while Frenchman Johann Zarco, who was on pole, finished third, with MotoGP legend Valentino Rossi in fifth.
Quartararo, who won the first two races of this season, was seventh and retains the title lead from Spaniard Maverick Vinales, who was 14th.
World champion Marc Marquez missed the race after a second operation on a broken arm.
The next round is scheduled to take place in Austria on 16 August.
1. Brad Binder (SA/KTM) 41min 38.764secs
2. Franco Morbidelli (Ita/Yamaha-SRT) +5.266secs
3. Johann Zarco (Fra/Ducati-Avintia) +6.470
4. Alex Rins (Spa/Suzuki) +6.609
5. Valentino Rossi (Ita/Yamaha) +7.517
6. Miguel Oliveira (Por/KTM-Tech3) +7.969
7. Fabio Quartararo (Fra/Yamaha-SRT) +11.827
8. Takaaki Nakagami (Jpn/Honda-LCR) +12.862
9. Jack Miller (Aus/Ducati-Pramac) +15.013
10. Aleix Espargaro (Spa/Aprilia) +15.087
1. Fabio Quartararo (Fra/Yamaha-SRT) 59 points
2. Maverick Vinales (Spa/Yamaha) 42
3. Franco Morbidelli (Ita/Yamaha-SRT) 31
4. Andrea Dovizioso (Ita/Ducati) 31
5. Brad Binder (SA/KTM) 28