World champion Jorge Lorenzo recorded his third win of the season with victory at the Catalunya Grand Prix.
The Spaniard, 26, stole the lead from Dani Pedrosa on the first lap in Barcelona and held off the challenge of his compatriot to follow up his win in Mugello last time out.
Pedrosa took second while Marc Marquez completed an all-Spanish podium.
Britain's Cal Crutchlow was bidding for a third successive podium but crashed out on lap six.
The 27-year-old, who finished second in France and third in Italy, had qualified second.
Nine-times world champion Valentino Rossi of Italy finished fourth while Germany's Stefan Bradl crossed the line fifth.
British rider Bradley Smith secured his best result of the season with sixth, despite racing with a badly injured finger.
Pedrosa, bidding for a third win of the season and a sixth successive podium, started on pole after a stunning qualifying performance that saw him set a new lap record at the Catalunya circuit.
However, he lost out to Lorenzo at the first turn and from then on his race was largely about defending his position from Marquez.
Crutchlow, too, lost ground on the first lap, dropping to fourth before his race was ended with 20 laps to go as he slid off into the gravel.
With Lorenzo comfortable in first place, the fight for second provided the most interesting spectacle as Marquez sought the right moment to make his move on Pedrosa.
The rookie thought that had come on the final lap but Pedrosa held off his compatriot under braking at the end of the back straight to take second by just 0.063secs.
Lorenzo remains second in the standings but cuts the gap on championship leader Pedrosa to seven points.
"I didn't expect this victory," he told BBC Sport.
"I knew the key was the start and not to let Dani Pedrosa get away but I had luck and did better than I expected at the start.
"It was very hard from then on but I kept pushing for the rest of the race."
Pol Espargaro continued a good day for Spanish riders as he held off a late challenge from compatriot and Tuenti HP 40 team-mate Tito Rabat to win the Moto2 race.
Switzerland's Thomas Luthi took third for his first podium of the season, while championship leader Scott Redding had to settle for fourth following two successive victories. The Briton leads Espargaro by 35 points in the overall standings.
Luis Salom moved top of the Moto3 standings by claiming a third win of the season, finishing ahead of Alex Rins and Maverick Vinales.
Salom leads Vinales in the championship standings by five points, with Rins a further 21 points behind in third.
Catalunya MotoGP results:
1. Jorge Lorenzo (Spa) Yamaha 43'06.479
2. Dani Pedrosa (Spa) Honda '43:08.242
3. Marc Marquez (Spa) Honda '43:08.305
4. Valentino Rossi (Ita) Yamaha '43:12.353
5. Stefan Bradl (Ger) Honda '43:33.235
6. Bradley Smith (Gbr) Yamaha '43:38.707
7. Andrea Dovizioso (Ita) Ducati '43:39.171
8. Aleix Espargaro (Spa) Aprilia '44:05.094
9. Colin Edwards (US) FTR '44:09.621
10. Michele Pirro (Ita) Ducati '44:16.253