The Pentagon announced Wednesday that Secretary of the Navy John C. Phelan is departing the administration, “effective immediately.”

“On behalf of the Secretary of War and Deputy Secretary of War, we are grateful to Secretary Phelan for his service to the Department and the United States Navy,” said Pentagon spokesman Sean Parnell. Undersecretary Hung Cao will become Acting Secretary of the Navy.

The announcement was particularly shocking given the Navy’s critical role in preventing Iranian ships from traversing the Strait of Hormuz. U.S. forces have redirected 31 vessels to return to port and boarded two ships as part of this effort.

Multiple sources indicated longstanding tensions between Phelan and Deputy Defense Secretary Hegseth, who believed Phelan was moving too slowly on implementing shipbuilding reforms and was also irritated by Phelan’s direct communication with Trump, which Hegseth viewed as an attempt to bypass him. Deputy Defense Secretary Steve Feinberg had similarly sought control over major responsibilities for shipbuilding and navy acquisitions—a role typically under Phelan.

According to a senior White House official, the issues came to a head during a meeting between Trump and Hegseth on shipbuilding at the White House Wednesday. Frustrated by slow progress, Trump became convinced during the meeting that Phelan needed to be replaced. He instructed Hegseth to “take care of it,” as Phelan is subordinate to the defense secretary. Hegseth then sent a message to Phelan informing him he must resign or be fired.

Phelan did not appear to believe Trump was aware of the message, and began contacting other White House officials asking if they had heard about his resignation order and whether they knew if the president was informed. It was around this time that Parnell issued the statement.

“Phelan didn’t understand he wasn’t the boss. His job is to follow orders given, not follow the orders he thinks should be given,” a source told reporters. The same individual noted that Phelan and Hegseth did not “get along.”

Phelan had previously sat down with a dozen reporters Tuesday afternoon to discuss the Navy’s future, including its major investments such as the Golden Fleet and battleships and frigates. He emphasized the need to improve shipbuilding capabilities.

Phelan, a longtime financier confirmed by the Senate about a year ago, is set to transition to his next role.