Fabio Di Giannantonio held Aron Canet at bay to claim his maiden Moto3 win in a thrilling Czech Grand Prix, while Marco Bezzecchi reclaimed the championship lead with sixth.
Poleman Jakub Kornfeil grabbed the holeshot into Turn 1 off the line ahead of Gabriel Rodriogo and Marcos Ramirez, with the Prustel GP rider opening up a gap of eight tenths by the end lap one.
Kornfeil continued to lead the way for the opening handful of tours as Aron Canet led the chase against the Czech rider, cutting his advantage down to half a second by the start of lap four.
Ramirez wrestled the lead away from Kornfeil into the first corner on lap five, with Canet and Rodrigo demoting the Czech rider to fourth in one fell swoop.
Canet usurped Ramirez later in the lap, while John McPhee moved to the head of the pack a few tours later as Dennis Foggia began to charge through the pack.
Foggia hit the front on lap nine, though Fabio Di Giannantonio made sure this was short-lived, as McPhee crashed out of contention after contact with Ramirez at the final corner at the end of lap 10.
The lead changed hands beween Foggia and Di Giannantonio several times as the race reached mid distance, with Philipp Oettl taking a turn at heading the pack also.
After fading down the order following his initial stint in the lead, Kornfeil regrouped in the closing stages and led across the line to start the final lap.
Di Giannantonio fired his Gresini Honda up the inside of Kornfeil into Turn 1, and maintained the position despite running wide and allowing Canet to draw alongside as well.
Canet muscled past Kornfeil for second, and piled the pressure on Di Giannantonio as they entered the final sequence of corners.
Di Giannantonio prevailed, however, to take his first win and move to with 17 points of standings leader Bezzecchi, with Canet a further four adrift.
Kornfeil's hopes of a home victory were dashed when he ran wide at the Schwantz corner on the final lap, but fended off a late charge from Enea Bastianini to complete the podium.
Rodrigo rounded out the top five ahead of Bezzecchi, who moves three points clear of the absent Jorge Martin in the championship. Ramirez, Oettl, Albert Arenas and Lorenzo Dalla Porta completed the top 10.
Niccolo Antonelli just missed the top 10 in 11th, brief leader Foggia fell to 12th at the chequered flag. The final points were claimed by Kazuki Masaki, Tatsuki Suzuki – who started at the back following a crash in qualifying – and Tony Arbolino.