A huge explosion and fire that crippled an Indian navy submarine in its home port of Mumbai has allegedly killed all 18 sailors aboard, a naval official said.

The official, speaking on condition of anonymity because divers had yet to recover any bodies, said the navy believed there was no way anyone could have survived the intensity of the blasts and fire.

"It's a loss to all of us. It's a tragedy," Defence Minister A.K. Antony told reporters on Wednesday before leaving for Mumbai to assess the situation.

"I feel sad ... about those navy personnel who lost their lives in the service of the country," he said.

Earlier on Wednesday, the navy said the sailors were trapped after the conventionally powered submarine, INS Sindhurakshak, cautht fire and sank in the coastal city.

A massive search operation has been launched to rescue the trapped sailors.

The cause of the explosion is being investigated, Narendra Vispute, the navy spokesperson, said. Further details were not available.

Vinod Kumar Menon, city editor of Mid-Day newspaper based in Mumbai, said that fire started at midnight and went on till 5:30-6:00am local time.

Indian news channel, NDTV, said nearly a dozen fire engines rushed to the dockyard to douse the fire.

The submarine was nearly submerged at its berth in the naval dockyard.

Indian media reports say the 16-year-old Russian-made submarine, INS Sindhurakshak, had recently returned from Russia after undergoing an overhaul and upgrade.

The submarine had been damaged in a deadly explosion in 2010.

Source: Agencies