Marquez was ahead from the start and created a gap of more than four seconds before he started to have tyre problems.
Rossi used the opportunity and finally took the lead on the second last lap.
Spanish rider Marquez, winner of 13 races last season, touched Rossi's back wheel and crashed out as Rossi raced on to victory.
Marquez and his Honda team had decided to go with hard tyres but the strategy backfired badly as Rossi managed to gain terrain with his Yamaha.
Marquez had been on track to move level with Rossi in the world championship standings but now stand to lose ground.
Rossi had already won in Qatar while Marquez claimed the second race of the campaign in Texas where the Italian came third.
"I'm sorry for the accident and sorry for him but I hope he's OK," said Rossi in a reaction minutes after the race. "I had a great race and the bike was fantastic but I could see that he (Marquez) was having problems with his tyres."