According to the Pakistani Navy:
PNS Ghazi commenced laying a small minefield east of the Vishakapatnam harbor mouth on the overnight of 2-3 December 1971. Then at daybreak on 3 December, it headed out to deeper water to search for the INS Vikrant battle group. Not finding it, PNS Ghazi returned to the Vishakapatnam harbor mouth area at sunset to resume laying the minefield. As the lights ashore were blacked out, PNS Ghazi may have misjudged her position and doubled back into her own minefield around midnight; about 10-15 minutes before the INS Rajput depth charging. Thus, it was the accidental detonation of its own mines that destroyed the Ghazi and not INS Rajput‘s depth charges.
Over the years, the mystery surrounding the sinking of PNS Ghazi has endured. Today, the submarine lies embedded in the Vizag seabed about 1.5 nautical miles from the breakwaters. Close to the harbour channel, the spot has been marked on navigational maps to help ships avoid the wreck.
Vice Admiral (retd) G M Hiranandani (whose book, Transition to Triumph, gives a detailed history of the Indian Navy) says, “The truth about the Ghazi, which remains on what the submarine community calls the ‘eternal parole’, lies somewhere between the Indian and Pakistani versions of the sinking but no one knows exactly where.”