Angel Piqueras earned a stunning photo-finish victory in the Qatar Moto3 race at the Lusail International Circuit.
Piqueras defeated Japanese riders Taiyo Furusato and Ryusei Yamanaka by just 0.009s over the line to take the lead of the championship alongside his victory.
Poleman Ryusei Yamanaka was able to hold onto first position ahead of championship leader Rueda on the run down to Turn 1.
Joel Kelso lost a position to Rueda on the start but responded almost immediately and was then able to pressurise Yamanaka for the lead.
The Japanese rider returned to the head of the pack with the aid of the slipstream down the main straight.
Angel Piqueras duelled with Rueda for the final podium position, but the KTM Ajo rider managed to keep his advantage.
Both riders were then able to get past Kelso and then-race leader Yamanaka, as the battles raged-on throughout the opening laps.
As the jostling for position continued, Dennis Foggia made contact with David Munoz as the Italian exited the race, with Adrian Fernandez narrowly avoiding the stricken bike as he served his long lap penalty from a practice incident.
Yamanaka and Kelso managed to regain their positions from the Spanish pair, as it appeared to become a four rider shootout for the victory.
David Almansa, who was bridging the gap to the leading riders, crashed out of fifth place with seven laps to go.
Taiyo Furusato made progress from the midfield to join the lead group and capitalised on a mistake from Yamanaka to move onto the podium.
Furusato produced a double overtake on Piqueras and Yamanaka to lead the group over the line to start the final lap of the race.
As the rest of the group started the final lap, championship leader Rueda suffered a problem with his bike and was forced to retire from the race.
Furusato had the optimum position with five corners to go, and was able to launch an attack on Piqueras to take the lead of the race.
However, the Japanese rider compromised his exit going into the final corner of the race, which allowed Piqueras and Yamanaka to take the slipstream.
It was Piqueras who prevailed in a fantastic battle between the three riders, as he took victory by 0.009s.
Furusato managed to hold onto second over the line ahead of compatriot Yamanaka who completed the podium.
Kelso took the flag in fourth place, over seven seconds ahead of Riccardo Rossi in fifth.
Munoz faced a conduct warning in the early stages of the race but crossed the line in sixth, as Sic58 Squadra pair Luca Lunetta and Stefano Nepa trailed behind in seventh and eighth respectively.
Nicola Carraro earned ninth place, with fellow Italian Guido Pini rounding out the top 10.
Alvaro Carpe made a good start to the race, but was forced to take a double long lap penalty for a qualifying collision and could only manage 11th.
Scott Ogden, who was the victim of Carpe’s indiscretion in qualifying finished just behind the Spaniard in 12th, with Ruche Moodley finishing 13th.
Tech3 KTM’s Jacob Roulstone battled his way to 14th, with team-mate Valentin Perrone completing the points finishers in 15th.