Marquez held his own in the opening laps, keeping out of trouble and moving ahead of the chasing pack with Dovizioso.
The Spaniard was soon joined in his hunt for victory by seven other riders, vying for the top position over the next 20 laps.
LCR Hondas Cal Crutchlow finished third.
Just 0.023 seconds split Marquez from Andrea Dovizioso as they crossed the line, Marquez opening his 2019 season with 20 points, a press release said.
He, however, finished a battling 13th to earn three points.
"It was exactly the same as last year! I tried to push hard but here when you overtake you just run wide and you cant keep the line.
I tried to be there, to push a little and just be there until the end," Marquez said.
"I am very happy with these 20 points because normally we struggle here and this weekend especially we worked a lot.
We changed some things that meant I couldnt push like I normally do in braking.
(This story has not been edited by Business Standard staff and is auto-generated from a syndicated feed.)