Fire tenders from the Naval Dockyard as well as the Mumbai Fire Brigade were immediately pressed into action.
However, due to as yet unknown damage suffered as a result of the explosion, the submarine has submerged at her berth with only a portion visible above the surface.
About 18 persons were on board the submarine at the time of the accident and efforts are on to ascertain the safety of the personnel and salvage of the submarine.
Navy orders board of inquiry
The Navy has ordered a board of inquiry to probe the explosion and subsequent fire on board the submarine, a defence spokesperson said.
The submarine had returned after a major upgrade programme in Russia 3-4 months ago and is armed with a potent weapons package including the anti-ship Club missiles.
INS Sindhurakshak was not on active duty at the time of the accident, Navy sources said.
The incident has come at a time when the Navy is facing a situation of depleting submarine fleet.
In 2010, a fire mishap took place on the INS Sindhurakshak leaving a sailor dead and two others injured.
That mishap was caused by an explosion in its battery compartment.
India had bought the 2300-tonne submarine from Russia as part of an early 1980s deal and commissioned it in 1997. It is the ninth of the 10 Sindhugosh class diesel-electric powered vessel that the Navy has in its 16-vessel submarine fleet.
In the last few years, there have been several mishaps involving naval vessels. In 2008, another vessel of the Kilo class, INS Sindhugosh, collided with a merchant vessel off Mumbai while participating in a naval exercise.
In 2011, a surface warship INS Vindhyagiri caught fire when it collided with a merchant vessel near the Mumbai harbour while returning from a picnic with families of group of officers deployed on board.
On its way back, it hit another ship leaving the harbour.
Nobody was injured but the warship was virtually ruined.
(With PTI inputs)