Dani Pedrosa kept his faint hopes of a first MotoGP championship alive with a dominant win in Aragon.
Pedrosa, who turned 27 on Saturday, was able to cruise away from pole-sitter Jorge Lorenzo to win his fourth race of the season.
Tech 3 Yamaha rider Andrea Dovizioso took third with his British team-mate Cal Crutchlow finishing in fourth.
Lorenzo - who won the title in 2010 - now leads the standings by 33 points with four races remaining.
Pedrosa realistically had to win to preserve his hopes and after passing Lorenzo on lap seven, the Repsol Honda rider powered away to win by 6.472 seconds.
Lorenzo was happy enough to settle for second and remains a huge favourite to regain his title.
He told BBC Sport: "I was very quick in the first few laps but Dani got past.
"I then made a mistake at the exit of the first corner and almost crashed and at that moment I knew I could not keep up the pace and follow him.
"It was a race for the championship, nothing more, and I am happy to finish second."
German rookie Stefan Bradl showed some strong early pace to move into third, but his hopes of a first podium finish were dashed when he crashed out.
Ducati rider Nicky Hayden also had a big crash, driving into a wall and being thrown over the top.
The 2006 world champion was taken to the circuit's medical centre but was later declared fit.
After Bradl's accident, Dovizioso, Crutchlow and Ben Spies took part in a race-long battle for third, with Crutchlow twice passing his Italian team-mate in the last two laps but each time failing to make his move count.
Crutchlow said: "I'm disappointed not to get on the podium again but Dovi is a class act - people forget he finished third in the championship last year.
"A podium will come again before the end of the year, I am sure. It's nice to have a solid race and take some good points."
Jonathan Rea, in his second and possibly final race standing in for injured world champion Casey Stoner, came home in seventh.
His finish meant that there were two Britons in the top seven in the premier class since the British Grand Prix at Donington in 1993.
There was British success in the Moto2 class as Scott Redding took third behind race winner Pol Espargaro and championship leader Marc Marquez.
In the Moto3 race, Luis Salom completed a Spanish clean sweep on home soil by winning ahead of championship leader Sandro Cortese, with Jonas Folger third. Briton Danny Kent was fourth.
Watch higlights of the race below: