Casey Stoner took the greatest victory of his young career at Catalunya on Sunday - the young Australian brilliantly matching Valentino Rossi blow-for-blow to claim his fourth win of the season.

Rossi began the Catalan Grand Prix from pole position and with momentum firmly behind him after an emotional home victory at Mugello last weekend - which had marked the first time the former five-times MotoGP champion had beaten Stoner for four rounds and put the Italian back within nine points of the Ducati star.

Last season's Catalan race began with a nasty first turn pile-up, but fortunately there was no repeat in 2007 as home hero Dani Pedrosa rocketed from the outside of the front row to safely lead Stoner, Suzuki's John Hopkins and a cautious Rossi through the first turn.

A near highside later in the lap for second-on-the-grid Randy de Puniet helped the top four pull clear of the rest of the field - but not each other; by the halfway stage of the 25 laps Stoner, Rossi, Pedrosa and Hopkins were covered by less than one second with a near five-second gap over the injured de Puniet.

While they may have been almost inseparable on track, the potential of the top four was very different. Stoner and Rossi were focussed entirely on victory at all costs, but Pedrosa - although just a fraction behind - never looked capable of attacking, while the relentless pace soon proved too much for Hopkins' Suzuki.

The Stoner/Rossi fireworks really began on lap 18 when Rossi dived inside the Ducati. Stoner - as he had earlier in the race - immediately responded by cutting back underneath the #46, but this time Rossi also retaliated and held the lead for the first time.

Catalunya's 1km main straight was perfect Ducati territory, but the top speed differential between Stoner's factory Desmosedici and its chief rivals wasn't as overwhelming as it has been. Rossi and Pedrosa had both been able to stay in Stoner's slipstream but - with the situation now reversed - Casey looked set to slingshot past Rossi on the run into turn one.

That proved the case, but Rossi looked over as his red attacker drew alongside and responded by leaving his braking to the latest possible moment. The Doctor was certainly much stronger on the brakes and was just able to defend his lead, but Stoner wasn't to be denied and dived inside again at the very next turn. That produced the exciting sight of Stoner, Rossi and Pedrosa almost three-wide through the long right-hander, before Casey ran Rossi wide onto the kerbs. Amazingly, the fight still wasn't over as Rossi again lunged for the lead - and again Stoner delivered a successful counter attack.

It took Rossi a lap to get back onto Stoner's rear wheel, with Pedrosa still shadowing the M1 rider, and this time he tried an audacious pass into the fast final turn. It was a success, but Stoner unleashed Ducati horsepower to regain the advantage along the straight.

Rossi's faith in the front of his M1 helped him outbrake Stoner into turn one with four laps to go, and he exploited all of his braking advantage to defend the position at the same place a lap later. However, Rossi wasn't able to shake the #27 and as the penultimate lap began, Stoner drilled his Desmosedici's throttle out of the final turn and made sure he was ahead into turn one.

Rossi crawled all over the Australian for the next two laps, rarely more than a tenth behind, but Casey again proved completely unshakeable in the face of such pressure and Rossi - also on the limit - simply had no answer.

Stoner crossed the finish line just 0.069secs ahead to build his championship lead back up to 14 points after seven rounds, but the psychological gain was far greater. Catalunya is one of Rossi's favourite tracks and he has been exuding confidence in his bike and tyres all weekend - only to have victory snatched away from him.

Perhaps it wasn't such a big surprise - for the last nine MotoGP races the rider starting on pole position has failed to win, an all-time record.

Home hero Pedrosa finished just 0.39sesc from victory, but in reality was little more than a high speed spectator - the Repsol Honda rider being perfectly placed to pick up the pieces of any incident, but unable to go on the offensive. Dani has now gone a year without a victory and will hope to repeat his 2006 success next time out at Donington Park.

Hopkins finished an untroubled fourth, while de Puniet produced a brave ride to a MotoGP best of fifth despite his badly injured knee. Stoner's team-mate Loris Capirossi climbed up from a disastrous 17th on the grid to finish 1.5secs behind the Frenchman with Suzuki's Chris Vermeulen in turn a fraction from the Italian's rear wheel at the line.

Alex Barros, who beat Stoner to third last weekend, was eighth on the d'Antin Ducati, while Marco Melandri brought his Gresini Honda home in a forgettable ninth. Team-mate Toni Elias saw his home hopes end when his RC212V's engine failed while holding sixth on lap 15, making the aggressive Spaniard the only retirement.

While their team-mates stood on the podium, Colin Edwards and world champion Nicky Hayden faded from sixth and seventh on the grid to claim 10th (Edwards) and 11th (Hayden) at the flag.

Catalan Grand Prix:

1. Stoner
2. Rossi
3. Pedrosa
4. Hopkins
5. de Puniet
6. Capirossi
7. Vermeulen
8. Barros
9. Melandri
10. Edwards
11. Hayden
12. Tamada
13. Hofmann
14. Guintoli
15. Nakano
16. Kenny Roberts
17. Checa
18. Kurtis Roberts