Donald Trump’s nominee to become the top officer in the US Navy has instead announced his retirement amid allegations of an inappropriate professional relationship with a former public affairs official.

Admiral William Moran announced the sudden decision on Sunday, likely adding to the perception of turmoil in the Pentagon's senior ranks, less than a month after Pat Shanahan abruptly withdrew from consideration to be defence secretary after serving as the acting secretary for six months.

Leaders of the individual military services, both civilian and uniformed, play less critical roles in national security than the defence secretary, and they are not in the chain of military command. But they are responsible for ensuring that the armed forces are trained, equipped and prepared for combat and other roles.

Mr Moran had been vetted for promotion to the top uniformed position in the Navy, nominated by the president and confirmed by the US Senate in May to succeed Admiral John Richardson as chief of naval operations and as a member of the Joint Chiefs of Staff.

Instead, he said in a written statement on Sunday evening that he told Mr Spencer he decided to decline his appointment as the next chief of naval operations and requested to be allowed to retire. Mr Moran said his decision to decline the appointment and to instead retire was based also on what he called an open investigation into "the nature of some of my personal email correspondence over the past couple of years."

Tensions high as Trump approves new Iran sanctions: In pictures Show all 17 1 /17 Tensions high as Trump approves new Iran sanctions: In pictures Tensions high as Trump approves new Iran sanctions: In pictures Iran claims that in this picture released by Iran state TV, their surface-to-air missile is seen as it shoots down a US surveillance drone EPA Tensions high as Trump approves new Iran sanctions: In pictures This photo shows US RQ-4A Global Hawk unmanned surveillance drone. A drone of this model was shot down by Iran on Thursday 21 June AFP/Getty Tensions high as Trump approves new Iran sanctions: In pictures An oil tanker is on fire after it was subject to a suspected attacked at the Gulf of Oman on June 13. The US has blamed Iran for the attack Reuters Tensions high as Trump approves new Iran sanctions: In pictures Iran claims that in this picture released by Iran state TV, debris from the downed US drone is seen after it was recovered from Iranian waters AFP/Getty Tensions high as Trump approves new Iran sanctions: In pictures Smoke billows from an oil tanker after it was subject to a suspected attacked at the Gulf of Oman on June 13 Reuters Tensions high as Trump approves new Iran sanctions: In pictures US President Trump holds up a signed executive order to increase sanctions on Iran on 24 June AP Tensions high as Trump approves new Iran sanctions: In pictures Iranian President Rouhani stated in a televised address that the White House is "afflicted by mental retardation" following the increase in sanctions on 25 June EPA Tensions high as Trump approves new Iran sanctions: In pictures An Iranian navy boat tackles the fire on the Norwegian owned Front Altair oil tanker after it was hit in a suspected attack AFP/Getty Tensions high as Trump approves new Iran sanctions: In pictures Iran claims that in this picture released by Iran state TV, debris from the downed US drone is seen after it was recovered from Iranian waters AFP/Getty Tensions high as Trump approves new Iran sanctions: In pictures Smoke billows from an oil tanker after it was subject to a suspected attacked at the Gulf of Oman on June 13 Reuters Tensions high as Trump approves new Iran sanctions: In pictures A screenshot from a video released by the US Department of Defense that the US claims to show Iranian removing an unexploded limpet mine form the hull of the Japan-owned ship that was attacked in the Gulf of Oman on June 13 Getty Tensions high as Trump approves new Iran sanctions: In pictures An item reportedly found on the Japan-owned oil tanker that was attacked on June 13 in the Gulf of Oman AFP/Getty Tensions high as Trump approves new Iran sanctions: In pictures A handout photograph from the US Department of Defense shows a composite material that the US claim was left behind on the hull of the Japan-owned oil tanker following the removal of an unexploded limpet mine Getty Tensions high as Trump approves new Iran sanctions: In pictures A view from the cabin of an Iranian navy boat as it tackles the fire on the Norwegian owned Front Altair oil tanker after it was hit in a suspected attack EPA Tensions high as Trump approves new Iran sanctions: In pictures Release by US government A picture released by U.S. Central Command shows damage to the hull of the oil tanker Kokuka Courageous. The picture suggests that the ship is 'likely' to have been hit by a mine as the US Secretary of State Mike Pompeo moves to blame Iran for the suspected attack Reuters Tensions high as Trump approves new Iran sanctions: In pictures Smoke billows from an oil tanker after it was subject to a suspected attacked at the Gulf of Oman on June 13 Reuters Tensions high as Trump approves new Iran sanctions: In pictures Release by US government A picture released by U.S. Central Command shows damage to the hull of the oil tanker Kokuka Courageous. The pictures suggests that the ship is 'likely' to have been hit by a mine as the US Secretary of State Mike Pompeo moves to blame Iran for the suspected attack EPA

"As painful as it is to submit my request to retire, I will not be an impediment whatsoever to the important service that you and your families continue to render the nation every day," Mr Moran wrote.

Richard Spencer, Secretary of the Navy, responded to the admiral’s decision with a statement saying it was “recently brought to my attention that over the past two years [Mr Moran] maintained a professional relationship with an individual who was held accountable and counselled for failing to meet the values and standards of the Naval profession.”

“While I admire his faithful service and commitment to the Navy, this decision on his part to maintain that relationship has caused me to call his judgment into question,” he continued. “Therefore, today I accepted Adm. Moran's request to retire."

Reports indicated the relationship in question was between Mr Moran and Chris Servello, who was removed from his position as public affairs adviser to Mr Richardson in 2017 and given a non-punitive letter of reprimand for drinking and fraternising with junior officers during and after a December 2016 Navy Christmas party.

Mr Servello was accused of making unwanted sexual passes while dressed as Santa at the party. No charges were filed against him. He retired from the Navy last May at the rank of commander.

Mr Servello had previously worked for Mr Moran as a public affairs officer.

With Mr Moran's departure, Mr Richardson will extend his tenure as Navy chief and Mr Spencer said he would recommend a new candidate for nomination by the president. Mr Richardson's official retirement date is in September.

Support free-thinking journalism and attend Independent events

Mr Moran's downfall adds to an unusually long list of leadership questions facing the Pentagon, which has been operating without a Senate-confirmed defence secretary since Jim Mattis resigned in December 2018. There also is no confirmed deputy secretary of defence, and several other key leadership positions are about to turn over.