A nuclear-powered submarine which ran aground in shallow waters off the Isle of Skye has been refloated, the Royal Navy has said.
HMS Astute was towed free by a tug at about 1800 BST and will be taken to deep water where a survey will be carried out on its rudder.
The £1bn submarine, described as the "stealthiest" ever built in the UK, was out on sea trials.
It became stuck on a shingle bank near the Skye Bridge at about 0800 BST.
The journey back to its base at Faslane on the Clyde could take several days.
HMS Astute, built by BAE Systems in Barrow in Furness, Cumbria, is believed to have been undergoing sea trials as it is not expected to enter service until next year.
Aside from attack capabilities, it is able to sit in waters off the coast undetected, delivering the UK's special forces where needed or even listening to mobile phone conversations.
The 39,000 acoustic panels which cover its surface mask its sonar signature, meaning it can sneak up on enemy warships and submarines alike, or lurk unseen and unheard at depth.
The submarine can carry a mix of up to 38 Spearfish heavyweight torpedoes and Tomahawk Land Attack Cruise missiles, able to target enemy submarines, surface ships and land targets.
It ran aground outside the safe sea lane marked on Admiralty charts.
The channel that runs underneath the Skye Bridge has red and green buoys known as lateral markers to ensure vessels do not run aground.
HMS Astute appeared to be lying in shallow water several hundred metres beyond that safe route.
The Admiralty charts show submerged rocks in the area where the submarine got into difficulty but the Navy said it was grounded on silt.
The Royal Navy said the submarine was operating under its own power after being towed free.
It said the vessel would remain overnight in deep water.
HMS Astute will be assessed on Saturday to determine whether it can return to Faslane under its own power or if it requires assistance.
A Royal Navy spokesman said: "It is a continuous process of assessment of the situation."
Scottish CND (Campaign for Nuclear Disarmament) expressed concern at the incident.
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."
The Scottish government's Environment Secretary Richard Lochhead said: "Ministers are being kept regularly updated of the situation and the Scottish government is working with Sepa (Scottish Environment Protection Agency) to closely monitor developments.
"At this stage there is no indication of damage suffered by the vessel that might lead to a fuel leakage, although close contact is being maintained with the MCA (Maritime and Coastguard Agency) to keep the situation under review.
"We have also been advised by the MoD that there is no damage to the reactor or leakage of radioactivity from it."
Mr Lochhead added: "This incident does bring into very sharp focus the regrettable decision by the Department for Transport earlier this week to dispense with the four emergency towing vessels stationed in particularly sensitive locations around the UK coast.
"One of those vessels has been tasked with assisting the refloating of HMS Astute and today's developments raise serious questions about the decision to scrap them."