Get all the latest news on coronavirus and more delivered daily to your inbox. Sign up here.

Acting Navy Secretary Thomas Modly has resigned, a U.S. official told Fox News on Tuesday, one day after Modly apologized for suggesting the ousted commander of the USS Theodore Roosevelt was either "too naïve or too stupid" -- or perhaps even deliberately insubordinate -- over his handling of the ship's coronavirus outbreak.

"Good riddance," a sailor onboard the Roosevelt told Fox News after hearing the development.

Defense Secretary Mark Esper spoke privately with Modly one-on-one earlier Tuesday morning, Fox News is told. Modley arrived at the conclusion that he should submit his resignation on his own, the sources said, and Esper then spoke to the president, who accepted the reason for the resignation.

"This morning I accepted Secretary Modly's resignation," Esper tweeted Tuesday afternoon. "With the approval of the President, I am appointing current Army Undersecretary Jim McPherson as acting Secretary of the Navy."

McPherson himself served onboard the Roosevelt in 1988, according to his official online biography.

President Trump had said at the White House coronavirus press conference on Monday that he might get involved in the public crisis because he is good at "settling arguments." Trump referred to Modly's criticism of the commander, Capt. Brett Crozier, as "a rough statement."

Audio of some of Modly's remarks -- and what appeared to be the stunned reaction of some of the crew of the Roosevelt -- had circulated online in recent days, along with earlier footage showing the crew cheering Crozier as he was relieved of duty.

Crozier had circulated a memo to Navy leaders last week that was obtained by news media in which he urged speedy action to evacuate the ship of nearly 5,000 sailors as the coronavirus began to escalate. Approximately 155 crew members aboard the USS Theodore Roosevelt have tested positive for COVID-19.

GOP SOUNDS ALARM AS REPORTER LINKED TO CHINESE GOVT GAINS ACCESS TO WH PRESS BRIEFING

“This will require a political solution but it is the right thing to do,” Crozier wrote in the memo. “We are not at war. Sailors do not need to die. If we do not act now, we are failing to properly take care of our most trusted asset — our Sailors.” He added that "due to a warship’s inherent limitations of space, we are not doing this," referring to social distancing.

“Removing the majority of personnel from a deployed U.S. nuclear aircraft carrier and isolating them for two weeks may seem like an extraordinary measure. ... This is a necessary risk,” Crozier continued. “Keeping over 4,000 young men and women on board the TR is an unnecessary risk and breaks faith with those Sailors entrusted to our care.”

Trump on Monday said Crozier shouldn't have sent the 4-page letter in an unclassified and unsecured manner, but the president added that he did not want to destroy "somebody for having a bad day."

CLICK HERE FOR FULL CORONAVIRUS COVERAGE

On Saturday, though, Trump had taken a harder line on Crozier: “I thought it was terrible, what he did, to write a letter. I mean, this isn't a class on literature," Trump remarked. "This is a captain of a massive ship that's nuclear powered. And he shouldn't be talking that way in a letter."

After Crozier's letter became public, Modly then flew to the ship, at port in Guam, and delivered a speech to the crew in which he lambasted Crozier, saying he was either “too naive or too stupid” to be in charge of an aircraft carrier -- or perhaps leaked the letter intentionally.

Modly charged that Crozier had allowed details of the ship's operational security to become public, either recklessly or intentionally.

“If he [Crozier] didn’t think, in my opinion, that this information [the letter] wasn’t going to get out into the public, in this day and information age that we live in, then he was either A, too naive or too stupid to be a commanding officer of a ship like this," Modly said. "The alternative is that he did this on purpose."

“So think about that when you cheer the man off the ship who exposed you to that,” Modly added. “I understand you love the guy. It’s good that you love him. But you’re not required to love him.”

Modly had relieved Crozier of command of the aircraft carrier last week. He said he'd lost confidence in Crozier for having shown “extremely poor judgment” in widely distributing a memo pleading for an accelerated evacuation of the crew members to protect their health.

Esper’s staff told Modly he must apologize, according to a person familiar with the conversation who spoke on the condition of anonymity to discuss a private conversation.

On Monday night, Modly issued his public apology.

"Let me be clear, I do not think Captain Brett Crozier is naive nor stupid," Modly said, referring to his speech aboard the Roosevelt on Sunday. "I think, and always believed him to be the opposite. We pick our carrier commanding officers with great care. Captain Crozier is smart and passionate."

“I apologize for any confusion this choice of words may have caused,” Modley continued. “I also want to apologize directly to Captain Crozier, his family, and the entire crew of the Theodore Roosevelt for any pain my remarks may have caused.”

Meanwhile, the dramatic footage showing Crozier's crew cheering him as he was relieved of duty rocketed around the internet-- and so did audio of Modly's remarks.

As public pressure increased, calls among Democrats in Congress for Modly's resignation were also mounting.

House Speaker Nancy Pelosi, D-Caif., called on Modly to be removed from his post, saying in a statement that he showed “a serious lack of the sound judgment and strong leadership” in firing Crozier.

"Acting Secretary Modly’s actions and words demonstrate his failure to prioritize the force protection of our troops,” Pelosi said.

Rep. Adam Smith, D-Washington, accused Modly of wanting to impress Trump.

"When I listened to the speech that Modly gave -- he was trying to do a half a--ed attempt at a speech that Trump would have given," Smith said. "He's trying to figure out 'what would the narcissist do' -- people are trying to figure out how to lead when their example is someone who is not competent or capable."

Smith continued: "Look, let me just say that I have worked with Esper and Modly for a long time -- I think very highly of them, their skill, their competence and their ability. I see Trump's creeping inserting himself, like when Trump got involved with [Eddie] Gallagher. Trump is at the top of the chain of command. "

Fox News' Andrew O'Reilly, Lucas Tomlinson, and The Associated Press contributed to this report.