The Royal Navy's newest and largest attack submarine HMS Astute has run aground off Skye, the Ministry of Defence (MoD) has confirmed.
Described as the stealthiest ever built in the UK, the £1bn boat was being put through sea trials and was not armed.
A Ministry of Defence spokeswoman said: "This is not a nuclear incident.
"We are responding to the incident and can confirm that there are no injuries to personnel and the submarine remains watertight."
The spokeswoman added: "There is no indication of any environmental impact."
The Maritime and Coastguard Agency (MCA) was alerted to the incident at about 0819 BST.
The Royal Navy said it was on silt, not rock, and hoped to re-float HMS Astute at high tide at about 1900 BST.
If this operation was successful, the boat will be towed to deeper waters and divers sent down to check for damage.
The submarine would then be towed back to its base at Faslane on the Clyde over the course of several days.
Eye-witness Ross McKerlich said the submarine was about a mile from his home and appeared slightly tilted.
He said: "When I woke up this morning and looked out my bedroom window I could see the submarine.
"I am very surprised how far in it has come as there are good navigational buoys there."
Mr McKerlich added: "There was a helicopter hovering over the top - it's now gone back and there are two Naval vessels from the local base, Kyle of Lochalsh, standing off to the north of her.
"Earlier in the day they did have ropes and they were trying to tow but now the tide has gone back and they're just standing off."
Mr McKerlich said HMS Astute was in an area of shallow water where he would not risk taking his yacht.
The submarine has run aground outwith 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 has got into difficulty.
Martin Douglas, a former nuclear submarine engineer, said a concern for the crew was the provision of sea water to the boat's reactor.
He said: "The sea provides the primary cooling for the reactor system.
"There are many, many levels of back up systems, but they may have to find some interesting ways of getting sea water supply to the reactor."
Mr Douglas said the skipper and crew were highly trained to deal with extreme situations.
But he added that as the tide dropped more HMS Astute would be on display and secrets of its propulsion revealed.
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, while its sonar system has a range of 3,000 nautical miles.
Speaking to the BBC last month, HMS Astute's commanding officer, Commander Andy Coles, said: "We have a brand new method of controlling the submarine, which is by platform management system, rather than the old conventional way of doing everything of using your hands.
"This is all fly-by-wire technology including only an auto pilot rather than a steering column."
Submarine HMS Trafalgar sustained millions of pounds worth of damage when it ran aground off Skye in 2002.
Two senior commanders were reprimanded after admitting that their negligence caused the incident.
The sea around Skye and the island of Raasay is used as a training ground for the Royal Navy.