DOHA - World champion Marc Marquez won the season-opening Qatar Grand Prix on Sunday just a month after breaking his leg. The Honda rider fought off a thrilling, wheel-to-wheel challenge from nine-time champion Valentino Rossi on a Yamaha to win by just 0.259sec. Dani Pedrosa, on the second factory Honda, took third.Marquez, who broke his right leg in a dirt-bike accident in his native Spain at the end of February, came into the new season having become the youngest ever world champion in 2013. "I enjoyed the race a lot, I did not expect the result but yesterday I had a good feeling fighting with Valentino," said 21-year-old Marquez. Rossi, seeking what would have been his 81st win in the elite MotoGP class, said he could take a lot out of the race, having been written off last season as a spent force."At the beginning I was a little not clear in my mind, do I attack? Then I said 'I go, I try', but after Marc was stronger. I had the potential to try at the end but unfortunately he was a little too far. But anyway it's a great result and I hope to continue like this." In a thrilling race beneath the Losail circuit floodlights, 2010 and 2012 world champion Jorge Lorenzo was done and dusted inside the first lap.The Spaniard, the runner-up to Marquez in the 2013 world championship, had started in fifth place but snatched the lead on the first bend. However, he suffered a dramatic race-ending crash at the end of the opening lap on his factory Yamaha which must have been painful for a man who twice broke his collarbone last year. "It was a high speed crash but not on the dangerous side," said Lorenzo."I made the mistake of a junior. The tyres are different from last year and the temperatures are colder than they were in qualifying. I didn't take these things into account." Germany's Stefan Bradl, on a Honda, soon found himself in the front but his evening also ended prematurely when he came off the track on the ninth lap. Rossi, who had started in 10th place on the grid, then took the lead from Marquez and held it for five laps as the 35-year-old Italian sensed a first win since Assen last year.However, Marquez, on the faster Honda, slipped by him on the 13th lap. They swapped the lead twice in a nail-biting penultimate lap, but Marquez had too much power for the Italian great. Pedrosa was happy to finish in third at a track he dislikes. "All the time we had tyre issues, the track is very slippery and I felt like the grip wasn't there," he said. "I don't like this track so I am happy with third." Australia's Jack Miller, riding a KTM, won the Moto3 race to capture his maiden career triumph.Spanish duo Alex Marquez, the younger brother of MotoGP world champion Marc, and Efren Vasquez, both on Hondas, took second and third respectively. The 19-year-old Miller, who was seventh in the world championship in 2013, duelled with Marquez over the course of the 18-lap race and made the most of a late error by the Spaniard on the last lap. In a thrilling conclusion, the top six riders were covered by just 0.586sec.In Moto2, Spain's Esteve Rabat saw off fellow Kalex riders, Japan's Takaaki Nakagami and Finland's Mika Kallio for victory. Rabat, who was third in the 2013 championship, claimed a fourth career win after a race which saw four riders -- Josh Herrin, Johann Zarco, Alex De Angelis and Xavier Simeon -- involved in a spectacular crash on the first lap. The MotoGP championship now moves on to Austin, Texas for the Grand Prix of the Americas on April 13.