Listen to this article
The Italian rider was involved in a big battle with eventual winner Niccolo Antonelli (Honda), second placed Brad Binder (KTM), making it an all three different manufacturers on the podium.
Fighting all through the 18-lap race, Bagnaia moved from second to sixth but took third on the last lap when fourth placed Romano Fenati (KTM) went wide on Turn 1.
The Aspar rider then held on to the position keeping Fenati at bay, finishing 0.148s off Antonelli, giving Mahindra's an unlikely podium.
This is the Indian marquee's fifth podium since entering into Moto3 in 2014 and Bagnaia's second with the manufacturer.
It wasn't a great finish for teammate Jorge Martin who was running 18th at Losail circuit but retired with one lap to go, leaving Platinum Bay's Darryn Binder, the second highest Mahindra at 23rd.
The Peugeot branded MGP03's Alexis Masbou finished 24th with his British teammate John McPhee at 25th.
McPhee was followed by the rest of the Mahindra riders with Tatsuki Suzuki (CIP) at 26th, rookie Stefano Valtulini (Team Italia) 27th, the other Platinum Bay of Karel Hanika 30th.
The last two spots were completed by Team Italia's Lorenzo Petrarca at 31st and CIP's Fabio Spiranelli 32nd.
|Rider||Team||Gap (From leader)|
|Jorge Martin||Aspar Mahindra||DNF|
|Francesco Bagnaia||Aspar Mahindra||0.148s|
|Darryn Binder||Platinum Bay||31.939s|
|Karel Hanika||Platinum Bay||59.105s|
|John McPhee||Peugeot SaxoPrint||32.547s|
|Alexis Masbou||Peugeot SaxoPrint||31.949s|
|Stefano Valtulini||Team Italia||34.584s|
|Lorenzo Petrarca||Team Italia||59.109s|
Qatar Moto3: Antonelli beats Binder by 0.007s in photo finish
New fairing allowed me to push, says Bagnaia
|Location||Losail International Circuit|
|Drivers||Francesco Bagnaia , Karel Hanika , Jorge Martin , Darryn Binder , John McPhee , Tatsuki Suzuki , Alexis Masbou , Fabio Spiranelli , Livio Selva , Stefano Valtulini|
|Teams||CIP , Angel Nieto Team , Team Italia FMI , Prustel GP|