Ministry of Defence says both the submarine's nuclear reactor and crew members are safe.

A nuclear submarine is seen at the Royal Navy's submarine base at Faslane, ScotlandRussell Cheyne/Reuters file photo

The Royal Navy's nuclear-powered submarine HMS Ambush was forced to dock in Gibraltar port after it collided with a merchant vessel. The submarine, the navy's newest and most advanced, was involved in a "glancing collision" with another vessel during a routine training exercise.

The Royal Navy said they are looking into the matter and added the £1.1bn ($1.45bn) vessel is currently undergoing further checks. A statement from the Ministry of Defence (MoD) read: "The submarine suffered some external damage but there is absolutely no damage to her nuclear plant and no member of the ship's company was injured in the incident."

Photographs circulating in social media show the vessel with a dented conning tower arriving at the Gibraltar port along with grim-faced crew members.

"We are in contact with the merchant vessel and initial indications are that it has not sustained damage." The ministry has said the nuclear reactor of the Astute-class attack vessel did not suffer any damage in the incident, which took place at about 1.30pm local time on Tuesday, 20 July. There are no safety concerns, it added.

The 7,400-tonne attack submarines are the British navy's latest sophisticated vessels and carry torpedoes. The HMS Ambush was one of three such submarines of the naval forces and it joined the fleet at the Faslane base in 2013.