HMS Astute was based at the Faslane Naval Base on the Clyde The naval chief in charge of a nuclear-powered submarine which ran aground off the Isle of Skye has been relieved of his command.
HMS Astute was being put through sea trials when it was marooned last month.
Navy officials confirmed that Andy Coles, 47, lost his command of the submarine on Friday.
He is to remain with the Royal Navy and is to be given another post. A final decision has still to be made about whether he will face a court martial.
A Royal Navy spokesman said: “It’s an internal administrative matter between Commander Coles and his senior officers.”
He added that a new commanding officer of HMS Astute would be appointed in the near future.
The vessel was towed free on 22 October after becoming stuck on a shingle bank for about 10 hours, before the tide began to rise.
HMS Astute was then damaged during the rescue operation after a collision with the coastguard tug the Anglian Prince, which was sent to free it.
The submarine returned to its base at Faslane on the Clyde three days after the incident.
The Navy spokesman said repairs had been completed on the £1bn vessel, but the final cost of the work was still being calculated.
He said: “It will be paid out of the existing MoD budget.”
He added a service inquiry into the incident had concluded and its findings were being considered.
The submarine was built by defence giant BAE Systems at Barrow-in-Furness, Cumbria.
It is the first in a fleet of six which will replace the Trafalgar-class submarine.
This article is from the BBC News website. © British Broadcasting Corporation, The BBC is not responsible for the content of external internet sites.