After being overtaken by Rossi, Dovizioso wisely clung to the Italian's rear wheel and followed in his wake past Edwards and then Hayden. The #69 initially repassed Dovizioso, but the former 125cc world champion made his second move permanent and kept fourth place by 2sec from Hayden at the chequered flag.
Dovizioso returned to find JiR Team Scot assembled outside their pit garage and with a sign saying 'Closed for a rider change. Please ask HRC next door' - in reference to Dovi's Repsol move - while Scot's 250cc rider Yuki Takahashi
was standing waiting to collect his MotoGP ride from Andrea!
Edwards finished in sixth position, a result which helped Tech 3 to claim fourth in the teams' world championship by just one point over Rizla Suzuki, which had held a four-point advantage over Herve Poncharal's squad heading into the final race.
Rossi's team-mate Jorge Lorenzo
confirmed fourth in the world championship and secured the 2008 Rookie of the Year title despite dropping from seventh on the grid to eleventh for the first half of the race.
The Estoril race winner, also riding in a special livery, then found form and overtook John Hopkins, de Angelis and Capirossi to take the chequered flag in eighth. Fellow rookie Alex de Angelis, who began the race 16th, finished tenth.
The top ten positions in the final world championship standings remained unchanged at Valencia with Rossi leading Stoner, Pedrosa, Lorenzo, Dovizioso, Edwards, Chris Vermeulen, Shinya Nakano
James Toseland had been hoping to snare a top ten ranking at the end of his rookie grand prix season, and began the race alongside team-mate Edwards in fifth on the grid. But the Englishman suffered a poor opening lap - slipping to twelfth - and rarely looked comfortable on his Michelin-shod M1. The double WSBK champion crossed the finish line in eleventh, and finished the season in the same position, 13 points shy of Capirossi.
Hopkins produced an excellent start to leap from 14th on the grid to seventh on lap one. Rossi found a way past the Kawasaki rider soon after, but Hopkins continued to put up a firm resistance against faster opponents for the first half of the race - only to drop from tenth to 14th during the second half.
Marco Melandri, riding in his final Ducati race before joining Hopkins at Kawasaki, looked like he might be able to salvage some pride from the final round as he worked his way from 18th and last on the grid to tenth on lap 24. But it all went wrong with just three laps to go, when a mistake left the Italian 16th, where he finished.
Randy de Puniet also made an error, running down the escape road on lap one. The Frenchman finished one place in front of Melandri to claim the final point for Honda LCR.