HMS Turbulent was commissioned in 1984 and has had a total of 13 commanding officers
A decommissioning ceremony has been held for a Plymouth-based submarine.
The service marked the end of the Royal Navy's Trafalgar Class submarine HMS Turbulent's service after nearly 30 years.
The Tomahawk-equipped submarine returned to its Devonport base in December after a 284-day deployment – 190 of which were spent submerged.
During the deployment HMS Turbulent fired its missiles to provide cover during Nato operations in Libya.
The Royal Navy said the submarine – the second oldest of its class – had had a distinguished service, but had come to the end of its natural operational life.
Titanic connection
Since being commissioned in 1984, HMS Turbulent has been deployed on patrols in the North Atlantic, the Far East and the Adriatic, where she saw service during the Balkans conflict.
Guest of honour at the decommissioning ceremony on Saturday was HMS Turbulent's first commanding officer, Capt Tim Lightoller (retired) – whose grandfather Charles Lightoller was the most senior officer to survive the sinking of the Titantic after it hit an iceberg 100 years ago on its maiden voyage from Southampton to New York.
Charles Lightoller later joined the Royal Navy and was decorated for his service in World War I and was part of the armada of small boats that evacuated solders from Dunkirk during World War II.
Other guests at the decommissioning ceremony included a total of 12 previous commanding officers, sponsor Lady Cassidi and family and friends of the submarine and crew over the years.
Capt Lightoller said it had been a day of "mixed emotions" for him.
Soviet monitoring
"I must admit to being emotional at seeing the end of HMS Turbulent's service today," he said.
"I was in charge of the boat for its first three years' of life and was at the launch with Lady Cassidi and got it through trials and testing and into operational service.
"It was then the Cold War and our prime role was monitoring Soviet submarine operations and working under the ice in the north Atlantic."
HMS Turbulent's current commanding officer, Cdr Nicholas Wheeler, said the service had been an opportunity to offer his and the Royal Navy's gratitude for the hard work the submarine's crews had provided over its service.