Tanaji Jadhav, the on-duty police constable at Hay Bunder port in Sewri, saved the day with an alert to the police control room at 3 am on Wednesday.
His message: "Something wrong in the air."
After the intimation on his walkie-talkie, the 42-year-old fainted because of the fumes.
Jadhav's warning raised an alarm and hastened the evacuation of those present in the ships anchored at the docks.
Jadhav was admitted to Balaji Hospital at Byculla and his condition is stable.
The constable is likely to be discharged on Thursday morning, doctors said.
Sources at the Mumbai port allege that two police constables are supposed to be on duty according to rules, but that only Jadhav was present on Wednesday.
Jadhav, who suffered from malaria last week, felt uneasy in his duty room and came out for some fresh air.
He realised that he was struggling to breathe even in the open and intimated the police control room immediately.
The police control room sent out ambulances and alerted the firemen.