Stoner managed to keep it at about the two second mark for the next three laps while Italy's Andrea Dovizioso and Rossi's team-mate Lorenzo had their own duel for third and were a further second adrift.
Suzuki rider Capirossi came to grief in spectacular fashion with 14 laps remaining, as with Colin Edwards challenging him for fifth spot he crashed and bounced several metres into the gravel before picking himself up gingerly to walk back to the pits.
Rossi brought the gap between him and Stoner down below the two second mark for the first time after nine laps of the 22 as the duo opened up a big gap between themselves and the rest of the field.
With 12 laps remaining Rossi had an eight second advantage over third-placed Lorenzo, but Stoner was not allowing his rival to close any further on him and with 10 laps to go he had almost a three second lead.
Stoner was up by three seconds with seven laps remaining, with Rossi seemingly powerless to do anything about it, but the eight-time world champion was by that stage nearly 15 seconds ahead of Lorenzo.
Rossi upbeat after Qatar second
With three laps remaining Stoner's lead stood at more than five seconds and he cantered home to victory to land the first blow of what promises to be a thrilling battle for the title.
Qatar's Losail International Circuit, the only night-time event on the MotoGP calendar, became the first race in 29 years to be postponed due to bad weather when heavy rain lashed down on Sunday.
Saturday's qualifying had already been difficult with dust, sand and wind, while the 250cc and 125cc races on Sunday were shortened because of rainfall and visibility problems.
Qatar MotoGP result: 1. Casey Stoner (Aus) Ducati 42 mins 53.984 secs 2. Valentino Rossi (Ita) Yamaha 43:01.755 3. Jorge Lorenzo (Spa) Yamaha 43:10.228 4. Colin Edwards (US) Yamaha 43:18.394 5. Andrea Dovizioso (Ita) Honda 43:21.247 6. Alex de Angelis (Smr) Honda 43:23.867 7. Chris Vermeulen (Aus) Suzuki 43:27.611 8. Mika Kallio (Fin) Ducati 43:28.739 9. Toni Elias (Spa) Honda 43:33.465 10. Randy de Puniet (Fra) Honda 43:36.268 11. Dani Pedrosa (Spa) Honda 43:42.510 12. Nicky Hayden (US) Ducati 43:42.867 13. Sete Gibernau (Spa) Ducati 43:46.199 14. Marco Melandri (Ita) Kawasaki 43:50.363 15. Yuki Takahashi (Jap) Honda 43:54.270 16. James Toseland (GB) Yamaha 44:08.962 17. Niccolo Canepa (Ita) Ducati 44:09.012
Did not finish: Loris Capirossi (Ita) Suzuki
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.