Jorge Lorenzo ended his ultra-successful season by coming back from seventh to take his ninth win of 2010 at Valencia.
Polesitter and long-time leader Casey Stoner (Ducati) had to settle for second, while Lorenzo's Yamaha teammate Valentino Rossi completing the podium.
Despite having looked untouchable for much of practice and qualifying, Stoner was unable to escape in the race, even as a massive battle for second erupted in the opening laps between the fast-starting Dani Pedrosa (Honda), Nicky Hayden (Ducati), Marco Simoncelli (Gresini Honda) and the two works Yamahas.
Hayden briefly made it a Ducati one-two after claiming second from Pedrosa, but crashed heavily at the first corner on lap three while pushing to stay with Stoner. The American was unhurt, but furious with himself.
Rossi had dropped to ninth at the start, while Lorenzo slipped to seventh when a near-miss with Simoncelli saw him come close to falling. But the Yamahas were not down the order for long. They demoted Simoncelli from third to fifth across laps six and seven, then both sliced past Pedrosa on lap 10. It did not take much longer for Rossi and Lorenzo to close right in on Stoner, swapping places along the way.
Just half a second covered the trio for several laps, before Rossi started drifting away. But Lorenzo maintained his pace and with seven laps to go he outbraked Stoner into Turn 2 to claim the lead.
He then pulled clear to win by 4.5 seconds, taking his season points tally to a record 383, with Rossi falling away in third as the Italian and Stoner proved unable to say goodbye to their current teams with victories.
Tech 3 Yamaha's Ben Spies defeated Andrea Dovizioso (Honda) and Simoncelli in a wild battle for fourth, as Pedrosa faded to an eventual seventh place.
Hector Barbera took eighth for Aspar Ducati, just ahead of Suzuki's Alvaro Bautista and LCR Honda's Randy de Puniet.
Pos Rider Team Time/Gap
1. Jorge Lorenzo Yamaha 46m44.622s
2. Casey Stoner Ducati + 4.576s
3. Valentino Rossi Yamaha + 8.998s
4. Ben Spies Tech 3 Yamaha + 17.643s
5. Andrea Dovizioso Honda + 19.160s
6. Marco Simoncelli Gresini Honda + 20.674s
7. Dani Pedrosa Honda + 26.797s
8. Hector Barbera Aspar Ducati + 29.288s
9. Alvaro Bautista Suzuki + 29.451s
10. Randy de Puniet LCR Honda + 29.860s
11. Aleix Espargaro Pramac Ducati + 31.761s
12. Colin Edwards Tech 3 Yamaha + 33.604s
13. Marco Melandri Gresini Honda + 36.622s
14. Hiroshi Aoyama Interwetten Honda + 38.968s
15. Carlos Checa Pramac Ducati + 56.169s
Loris Capirossi Suzuki 13 laps
Nicky Hayden Ducati 2 laps