The acting US Navy secretary who fired an aircraft carrier commander for raising concerns about coronavirus spreading through his crew then called him "stupid" and "naive" in a profanity-laced speech to those sailors has resigned, the latest scandal to rock the Trump administration.

Donald Trump, the commander in chief, appeared to side with the ousted captain on Monday night, calling him a good man with stellar service record. Modly fired the commander of the aircraft carrier Theodore Roosevelt, Captain Brett Crozier, after a letter he wrote about the virus infecting his crew leaked to the San Francisco Chronicle. As he left his ship, Mr Crovier's crew gave him a rousing send-off, prompting Mr Modly's appearence on Monday.

The president on Monday declined to comment on Mr Modly "stupid" allegation, other than saying it was a "strong statement."

But he told reporters he is hearing "good things about both men," and might have little choice but to get involved. It seems he let his feelings be known internally, and Mr Modly was gone less than 24 hours later.

Thomas Modly came under fire from many sides after his handling of the matter, with top congressional Democrats calling for his resignation.

"Sadly, Acting Secretary Modly's actions and words demonstrate his failure to prioritize the force protection of our troops," Speaker Nancy Pelosi said. "He showed a serious lack of the sound judgment and strong leadership needed during this time. Acting Secretary Modly must be removed from his position or resign."

It was not long before he did just that, with the Trump White House deciding this was one fight with Democrats it did not want to start.

The White House did not immediately name a permanent nominee, which would require Senate confirmation at a time when senators are back home, riding out the coronavirus pandemic. Mr Trump, who prefers "acting" secretaries, could opt to merely name another temporary top Navy civilian leader.