Acting Navy Secretary Thomas Modly resigned Tuesday amid controversy over his attacks against a fired captain who raised alarms about the coronavirus on his ship.

Politico first reported that Modly has “offered” to resign, in the publication’s words, and that it’s unclear whether Defense Secretary Mark Esper will accept the resignation. That question was put to rest later Tuesday: Esper tweeted that he had accepted.

This morning I accepted Secretary Modly's resignation. With the approval of the President, I am appointing current Army Undersecretary Jim McPherson as acting Secretary of the Navy. pic.twitter.com/FvfgOwuXw4 — @EsperDoD (@EsperDoD) April 7, 2020

Esper also confirmed a Wall Street Journal report that James McPherson, who serves as acting undersecretary of the Army, will replace Modly.

Pentagon spokesperson Christopher Sherwood told TPM earlier Tuesday afternoon that his office had not been informed of the resignation as the news broke. “We’re seeing the same reports you are but we haven’t received that information on this level,” he said in a call.

Last week, Modly fired Navy Captain Brett Crozier for emailing Navy leadership about enacting anti-coronavirus measures for his crew on the USS Theodore Roosevelt, which had close to 200 cases of COVID-19 onboard. Crozier himself tested positive for the disease several days ago.

Then the acting secretary came under fire on Monday after he ranted to the crew about how Crozier was either “too naive or too stupid to be a commanding officer of a ship like this” or that he had intentionally sent the memo to draw media attention to the ship’s dilemma with the virus.

Modly’s profane airing of grievances had all the trappings of a typical tirade from President Donald Trump, including claims of victimhood and gripes about the media.

“If I could offer you a glimpse of the level of hatred and pure evil that has been thrown my way, my family’s way over this decision, I would,” the acting secretary said of his firing of Crozier.

He also accused the media of having an “agenda.”

“And the agenda that they have depends on which side of the political aisle they sit,” Modly told the crew. “And I’m sorry that’s the way the country is now but it’s the truth and so they use it to divide us and use it to embarrass the Navy.”

The Navy official was defiant in the immediate aftermath of his screed at first, telling the New York Times “I stand by every word I said, even, regrettably any profanity that may have been used for emphasis.”

Then Modly did an about-face and issued a backhanded apology later on Monday (reportedly at Defense Secretary Mark Esper’s behest) in which he apologized for “any pain my remarks may have caused,” and said he did not truly believe Crozier to be stupid or naive because: “I believe, precisely because he is not naive and stupid, that he sent his alarming email with the intention of getting it into the public domain in an effort to draw public attention to the situation on his ship.”