(Reuters) - Italian Andrea Dovizioso won the Qatar Grand Prix for Ducati by the blink of an eye on Sunday as MotoGP served up a season-opening thriller at the floodlit Losail circuit.
Honda's reigning world champion Marc Marquez finished a mere 0.027 seconds behind the man who took last season's title battle down to the wire.
Valentino Rossi, the Italian great starting his 23rd grand prix season at the age of 39 and with a new two-year Yamaha contract freshly signed, joined them on the podium after the night-time race.
Dovizioso had started eighth but seized the lead from Frenchman Johann Zarco, who had set the pace from pole position, with five laps to go and pulled away with Marquez in close pursuit.
The Spaniard made his move at the last corner of the last lap but failed to make it stick, with Dovizioso using the Ducati's power to take his ninth MotoGP win.
Britain's Cal Crutchlow was fourth for LCR Honda, the best non-factory rider, with Zarco dropping to eighth as his tyres lost performance.
"It was a perfect race, perfect weekend," said Dovizioso of his first win in Qatar after three times finishing runner-up.
"We did a really bad start but I was calm. I recovered very slowly and saved a lot the tyres and was able to push at the end," added the Italian.
"As always with Marc, the last lap is very difficult but I was able to beat him again."
Marquez, winner of four of the last five MotoGP titles, did all he could at a track he sees as one of his most difficult.
"When Dovi was pushing I was losing the front, losing the rear but anyway I arrived close in the last corner. I tried," said the Spaniard.
"Again he beat me, but I'm very happy. Here a podium was the main target."
In a tightly-fought race, with the pack jostling for position behind Zarco before Dovizioso's move, the gap between winner and Honda's Dani Pedrosa in seventh place was just 4.6 seconds.
Rossi took the chequered flag 0.797 behind Dovizioso with Spanish team mate Maverick Vinales, last year's winner in Qatar, sixth.
"I expect more compared to last year, because with this year's bike I feel good," said Rossi, who won one race in 2017 and finished fifth overall despite breaking his leg at the end of August.
"I know that Marquez and Dovizioso are faster at the moment, they have a little bit more, so when Dovi went in front I tried to give 120 percent to stay with them."
(Reporting by Alan Baldwin in London, editing by Toby Davis and Pritha Sarkar)