Pedrosa's win on home soil was his second of the year
Home favourite Dani Pedrosa dominated from the start to claim a comfortable victory in the Catalunya MotoGP.
Pedrosa passed pole-sitter Casey Stoner on the first corner and built up an impressive lead which was almost eight seconds at one stage.
With Pedrosa out on his own, Stoner and Valentino Rossi had a fierce battle for second place as Rossi fought his way up from ninth on the grid.
With two laps left he found a way past Stoner and held on for second spot.
Britain's James Toseland, who started sixth on the grid, held off a late challenge from Chris Vermeulen to come sixth, matching his best finish so far.
Pedrosa started from second spot and took full advantage of a great start, breaking the two-year old lap record on the second lap.
To qualify sixth and finish sixth is a good show but I really want to get close to the front
His second win of the season was never really in doubt, so the main drama of the afternoon was the battle for runner-up spot between reigning world champion Stoner and Rossi, who had started from his worst qualifying position of the season.
He quickly moved up through the field, and by lap nine was up to second place after a breathtaking move to quickly get past Andrea Dovizioso and Stoner.
But the Australian refused to give in without a fight, and by lap 16 he had passed Rossi, but the Italian, wearing specially customised leathers in the style of the Italy football kit, regained second with two laps to go, and held on.
Pedrosa's win cuts Rossi's championship lead down to seven points, but having hauled his way up from such a poor starting place, Rossi was more than happy with his finish.
"I enjoyed it a lot, more than winning the Italian Grand Prix at Mugello, because I love a battle and this year we haven't had any," he told BBC Sport.
Toseland was also pleased with his day's work, and the prospect of returning to the familiar surroundings of Donington for the next race.
"I can't wait to get up to Donington, it's hard work on these new tracks," he said.
"To qualify sixth and finish sixth is a good show but I really want to get close to the front.
"I'm going to be pushing so hard, I really want that podium place."
Catalunya MotoGP result:
1 D Pedrosa (Spa) Honda 43mins 02.175secs
2 V Rossi (Ita) Yamaha 43:04.981
3 C Stoner (Aus) Ducati 43:05.518
4 A Dovizioso (Ita) Honda 43:13.068
5 C Edwards (US) Yamaha 43:18.601
6 J Toseland (GB) Yamaha 43:23.657
7 C Vermeulen (Aus) Suzuki 43:23.723
8 N Hayden (US) Honda 43:24.455
9 S Nakano (Jpn) Honda 43:24.550
10 J Hopkins (US) Kawasaki 43:49.100
World championship standings:
1 V Rossi (Ita) Yamaha 142 pts
2 D Pedrosa (Spa) Honda 135
3 J Lorenzo (Spa) Yamaha 94
4 C Stoner (Aus) Ducati 92
5 C Edwards (US) Yamaha 69