World champion Jorge Lorenzo ended Marc Marquez's winning streak to take victory after a classic last lap at the British Grand Prix at Silverstone.
Yamaha rider Lorenzo swapped the lead three times with Marquez, 20, through the last few corners.
But Lorenzo managed to make the crucial pass and win for the first time in six races.
Marquez's Repsol Honda team-mate Dani Pedrosa finished third, while Britain's Cal Crutchlow was seventh.
Marquez - showing no signs of discomfort despite dislocating his shoulder in a crash in practice just three hours before the race - still increased his lead in the championship to 30 points over Pedrosa.
Lorenzo is nine points further back in the standings as he bids to retain his title.
Valentino Rossi finished fourth, with Alvaro Bautista and Stefan Bradl fifth and sixth respectively. British rider Bradley Smith was ninth.
It was a lonely race for Smith's compatriot Crutchlow, who crashed heavily three times in practice.
After wrecking two bikes in big crashes on Saturday, Crutchlow was able to walk away from a scary crash in warm-up on Sunday morning.
He lost the front end of his Tech 3 Yamaha at Vale corner, coming to rest in a gravel trap.
But Crutchlow and several marshals were then forced to sprint to safety as Marquez crashed seconds later at the same corner, with the Spaniard's Honda skidding into Crutchlow's prone bike.
It was a close call for both riders, though Marquez's participation in the race was put into doubt as he dislocated his shoulder in the accident.
After treatment he was passed fit, and though he was subsequently punished by stewards for failing to slow down despite yellow flags being waved, he was able to start from pole position.
However, Marquez received two penalty points for his part in the incident.
If he reaches four penalty points he will have to start the next race from the back of the grid.
Lorenzo made a fine start to take the lead - almost touching Marquez - but the youngster tucked in right behind him as Crutchlow shuffled backwards to seventh at the end of lap one.
As the race progressed, Marquez put concerted pressure on Lorenzo without managing to find a way past.
He then made his move on lap 17 - diving inside at Brooklands to take the lead with two and a half laps left. Lorenzo regained the lead at Vale corner on the next lap before Marquez again forced his way through with three corners of the race remaining.
But crucially the youngster left a slight gap and Lorenzo was able to nip through to take a much-needed win.
Before the race, the packed grandstands were treated to a tribute to Barry Sheene - the last British rider to win a premier-class grand prix - who died 10 years ago.
Son Freddie Sheene and BBC commentator Steve Parrish were among the riders who took part in the parade on vintage bikes, including the 1975 Suzuki XR14 on which Sheene won his first 500cc race in 1975.
In the Moto2 class, British rider Scott Redding did give the Silverstone crowd something to celebrate when he strengthened his position at the top of the standings with a win.
Championship leader Luis Salom won the Moto3 race, finishing ahead of Spanish compatriots Alex Rins and Alex Marquez.
1 Jorge Lorenzo (Spa) Yamaha Racing 40'52.515
2 Marc Marquez (Spa) Repsol Honda +0.081
3 Dani Pedrosa (Spa) Repsol Honda +1.551
4 Valentino Rossi (Ita) Yamaha Racing +13.233
5 Alvaro Bautista (Spa) Honda Gresini +13.298
6 Stefan Bradl (Ger) LCR Honda +20.227
7 Cal Crutchlow (Gbr) Tech 3 Yamaha +26.299
8 Nicky Hayden (US) Ducati +35.993
9 Bradley Smith (Gbr) Tech 3 Yamaha +36.119
10 Aleix Espargaro (Spa) Aspar ART +53.196