The incident on July 20th sparked environmental fears as well as concerns it could lead to yet another diplomatic row between London and Madrid, which wants Gibraltar back centuries after it was ceded to Britain in 1713.
A defence ministry spokeswoman said HMS Ambush — the front of its conning tower still damaged — had left and was “absolutely safe to go to sea,” although she refused to tell AFP where it was headed.
The submarine was submerged and carrying out a training exercise when it collided with an unspecified merchant vessel last week, damaging its conning tower and forcing it to dock for checks in the overseas British territory on Spain's southern tip known as “the Rock”.
Concerned, Madrid asked London for urgent explanations as to the extent of the damage.
Britain's navy tried to allay fears, saying there were “no safety concerns” as the collision had not damaged HMS Ambush's nuclear plant.
The spokeswoman said that before sailing HMS Ambush underwent “a stringent safety review and full assessment of her ability to navigate safely.”
The incident revived memories of another submarine incident at the turn of the century, when Britain's HMS Tireless was forced to dock in Gibraltar for repairs for nearly a year after a crack was found in a cooling pipe near its nuclear reactor.
Its presence caused outrage in Gibraltar and southern Spain, with people staging regular protests, and strained ties between London and Madrid.
The tiny rocky outcrop of Gibraltar has long been the subject of an acrimonious sovereignty row between both countries.
Spain's conservative government, which has been in place since 2011, has been particularly vocal about its desire to see the territory come back into its fold.
In one particularly belligerent row over disputed waters, Spanish authorities upped checks at its land border with Gibraltar in 2013, creating hours-long logjams and forcing the European Commission to wade in and ease the crisis.
And there have been repeated incidents involving fishing or police patrol boats in disputed waters off the coast of Gibraltar.