The four-star admiral set to become the Navy's top officer on Aug. 1 will instead retire, an extraordinary downfall prompted by what Navy Secretary Richard Spencer called poor judgment regarding a professional relationship. Adm. William Moran is stepping aside after he continued to rely on a Public Affairs Officer who had received a career-ending censure for sexual harassment.

The sudden move by Moran, announced Sunday, may add to the perception of turmoil in the Pentagon's senior ranks, coming less than a month after Pat Shanahan abruptly withdrew from consideration to be defense 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 defense 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.

Get Breaking News Delivered to Your Inbox

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

Instead, Moran said in a written statement Sunday evening that he told Spencer he decided to decline his appointment as the next chief of naval operations and requested to be allowed to retire.

"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," Moran wrote.

Spencer said his vision for the Navy includes "an urgent resolve by all" to live up to high standards.

"Adm. Bill Moran recently brought to my attention that over the past two years he maintained a professional relationship with an individual who was held accountable and counseled for failing to meet the values and standards of the Naval profession," Spencer said in a written statement Sunday evening. "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. Therefore, today I accepted Adm. Moran's request to retire."

Senior Navy officials said Spencer learned of this relationship only after Moran's Senate confirmation in May. The officials spoke on condition of anonymity to discuss sensitive details.

Spencer provided no details about the unnamed individual, but other officials said Spencer was referring to Moran having recently taken public affairs counsel from Chris Servello, who was removed from his position as public affairs adviser to Richardson in 2017 and given a non-punitive letter of reprimand for drinking and fraternizing with junior officers during and after a December 2016 Navy Christmas party.

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. Servello had previously worked for Moran as a public affairs officer.

In an interview Sunday evening, Servello said he was aware of Moran's decision to retire.

"It's hard not to feel disappointment and disbelief," he said. "This is terrible news for the Navy, and beyond that, I don't have anything to add."

Moran said his decision to decline his 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." He also cited the Servello relationship, without using his name.

"To be clear," Moran added, "my decision to maintain this relationship was in no way an endorsement or tacit approval of" the kind of misconduct that Servello was disciplined for. "I understand how toxic it can be to any team when inappropriate behavior goes unrecognized and unchecked. Every Sailor is entitled to serve in an environment free of harassment or intimidation."

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

Moran is a naval aviator by training. He has been serving as the deputy chief of naval operations, the No. 2 uniformed position in the Navy behind Richardson. He was nominated in April to succeed Richardson and was confirmed for the post by the Senate in May.

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

Mark Esper, who had been Army secretary, is now the acting secretary of defense, but Trump has not yet sent his nomination to the Senate.

Marine Gen. Joseph Dunford is due to step down as chairman of the Joint Chiefs of Staff this fall. His intended successor, Army Gen. Mark Milley, is scheduled to testify at his confirmation hearing before the Senate Armed Services Committee on Thursday.

Also on Thursday, Gen. David Berger is scheduled to take over as commandant of the Marine Corps, succeeding Gen. Robert Neller.

Air Force Gen. Paul Selva, the vice chairman of the Joint Chiefs of Staff, is due to retire on July 31. Gen. John Hyten has been nominated to succeed Selva, but he has not yet had a confirmation hearing.