Fabio Di Giannantonio kept out of trouble to lead out of the final corner and win the inaugural Moto3 Thailand Grand Prix as the championship battle unfolded behind him at the Chang International circuit.

The Del Conca Gresini rider made it to the front of the lead group at the right moment after attacking hard on the last lap as the chaos of the final corner played out in his wake, for his second win of the season.

Victory brings the Italian right back into the championship battle too, now just three points behind Marco Bezzecchi.

The all Italian podium was completed by fellow Honda rider Lorenzo Dalla Porta (Leopard Racing), who came through for second and Dennis Foggia, who qualified down in 25th before charging through to his first podium finish for Sky Racing Team VR46 as top rookie and top KTM.

The final moments of the race saw Enea Bastianini take out a distraught Bezzecchi while Jorge Martin - riding with a modified glove following the hand injury he picked up while getting a medical massage - took full advantage to climb up to fourth and wheelie his Gresini over the line in excitement after having considered retiring from the race before his fortunes changed.

Martin now has a 26 point lead over Bezzecchi, with a total of 204.

With seventeen riders in the front group covered by just over four seconds Bezzecchi had no chance to remount and try to limit the damage.

RBA’s Gabriel Rodrigo survived the carnage in front of him for fifth- a massive improvement after qualifying 20th, while Vincente Perez rode bravely to claim his best ever finish in sixth for Reale Avintia Academy.

Nicolo Bulega brought the second Sky bike home in seventh, just ahead of Marcos Ramirez who took eighth for Bester Capital Dubai.

Wildcard Somkiat Chantra (AP Honda Racing Thailand) picked up the places while his race rivals fell, his track knowledge propelling him to an impressive ninth, with Jakub Kornfeil also making late progress to complete the top ten for Redox PruestelGP.

Andrea Migno did enough to take eleventh at the chequered flag for the Angel Nieto team, with Kaito Toba (Honda Team Asia) picking off enough riders to take twelfth.

The remaining points on offer went to Philipp Oettl (Sudmetal Schedl GP Racing) in 13th, Tony Arbolino (Marinelli Snipers Team) in 14th and Adam Norrodin (Petronas Sprinta Racing) in 15th.

Moto3’s second wildcard entry Apiwath Wongthananon (VR46 Master Camp Team) just missed out in 16th.

Jeremy Alcoba replaced the injured Aron Canet at Estrella Galicia, he brought the bike home in 18th.

John McPhee took to the grid sporting a broken toe among his injuries and remained in the mix until he slid out of contention at the start of the final lap as he exited the final corner.

Earlier in the race, after riding aggressively himself, the tables turned on Darryn BInder, who was taken out by Albert Arenas, converting his best qualifying into a trip into the gravel. Alonso Lopez joined them after sliding out of contention at the same corner.

One lap later The SIC58 team-mates Nico Antonelli and Tatsuki Suzuki took each other out.

Local rider Nakarin Atiratphuvapat made it to lap seven before he exited proceedings. He remounted and crashed again in the closing stages.

Ayumu Sasaki was next off with eight laps remaining, he was soon followed by Kazuki Masaki after he was clipped by Martin during an overtake.