Alex Marquez capitalised on a mistake from older brother Marc Marquez to take his first-ever MotoGP victory at Jerez.
Marquez dominated the closing stages of the race, which saw him win his first grand prix and regain the lead of the championship, after his elder brother Marc crashed on Lap 3.
Fabio Quartararo got the best start to the race from pole position and led into the first corner from Francesco Bagnaia.
Alex Marquez also made a good start from the second row and was able to pass his brother, but the elder Marquez responded almost immediately to regain third.
The Gresini rider then ran wide as he looked to overtake the Ducatis on the run to Turn 6 and dropped back to fourth, which gave Marquez and Bagnaia space to commence a duel.
Marquez made a move on team-mate Bagnaia going into Turn 7, but the Italian was able to respond immediately.
The Spanish rider tried to draw level again, but made contact with his team-mate as the opening lap drew to a close, with Bagnaia holding the advantage over Marquez onto the second lap.
Marquez attempted to find a way past Bagnaia throughout the entirety of the second lap, and brought the Gresini pair of Marquez and Fermin Aldeguer into podium contention with their battles.
The turning point of the race came on the third lap as Marquez crashed at the Aspar corner as he attempted to close the gap to Bagnaia, virtually ending any chances of a home race victory for the Spaniard.
The home hopes weren’t completely dashed by Marquez’s crash though, as the younger Marquez was by far the fastest rider on circuit and lined up a move on Bagnaia.
Marquez quickly found his way through on the Italian and set his sights on the Yamaha in the lead of the race.
Aldeguer was the fastest rider on circuit and was rapidly catching the leading trio, but crashed out of fourth on Lap 6 to end his hopes of a home podium.
As the race fell into a lull, Marquez attempted to make progress after rejoining the race, and passed Lorenzo Savadori, Marco Bezzecchi and Somkiat Chantra to move into 19th.
On Lap 11, the younger Marquez brother made the decisive move and overtook Quartararo for the lead of the race.
Marquez checked out at the front as Bagnaia was unable to make an immediate move on the Yamaha into second.
Further down the order, Ducati’s Marquez found himself back in the points after making a move on Augusto Fernandez.
With the race coming to a close, Bagnaia began to pressurise Quartararo for second, as Maverick Vinales saw an opportunity to get himself onto the podium.
It was Marquez who crossed the line to seal his first premier class victory by over two seconds.
Quartararo earned his first podium in 560 days by taking second for Yamaha. Bagnaia had no response for the Frenchman in front and was forced to settle for third.
Vinales continued his momentum from the QatarGP with his fourth place, four seconds ahead of Fabio Di Giannantonio in fifth.
Brad Binder led the factory KTMs over the line in sixth, with Pedro Acosta just behind in seventh.
Ai Ogura earned another strong points finish in eighth as Enea Bastianini had a flourish of late race pace to take ninth.
Luca Marini completed the top 10, half a second ahead of Honda stablemate Johann Zarco in 11th.
Marquez took Alex Rins at the final corner to earn points in 12th, with the Yamaha rider taking 13th respectively.
Espargaro finished his wildcard debut for Honda in 14th but was under investigation for tyre pressures, as Bezzecchi rounded out the points in 15th.
Raul Fernandez crossed the line in 16th, as Augusto Fernandez came home in 17th place and Lorenzo Savadori completed the finishers in 18th.
Aldeguer joined Joan Mir and Franco Morbidelli as the riders who crashed out of the race, while Jack Miller and Chantra suffered from technical problems and did not see the chequered flag.