HMS Astute, the nuclear-powered submarine that ran aground in shallow waters off the Isle of Skye, has been towed free, the Royal Navy said.
HMS Astute was on sea trials when her rudder is thought to have become stuck on a shingle bank between the mainland and the island off the west coast of Scotland. It is believed a crew transfer from the shore to the submarine was being carried out when the incident happened.
Royal Navy vessels and a tug helped free the submarine after an earlier attempt to tow the submarine failed, according to eyewitnesses.
A Navy spokesman described the accident as a "relatively minor incident", while a Ministry of Defence spokesman said: "This is not a nuclear incident. There are no injuries to personnel and the submarine is watertight."
The submarine weighs 7,800 tonnes, equivalent to nearly 1,000 double-decker buses, and is almost 100 metres (328ft) long. Its Spearfish torpedoes and Tomahawk cruise missiles are capable of delivering pinpoint strikes from 2,000km (1,240 miles).
The submarine's nuclear reactor means that it will not need refuelling once in its entire 25-year life and it makes its own air and water, enabling it to circumnavigate the globe without needing to surface.
John Ainslie, co-ordinator of Scottish CND, said: "This is just the latest in a long line of incidents involving nuclear submarines off the west coast of Scotland. These vessels are regular visitors to the seas around Skye.
"The Navy has several submarine trials areas near Raasay and Applecross. Inquiries into previous incidents have shown an appalling lack of common sense and basic navigation skills on these hi-tech submarines."