President Trump said Tuesday that acting Navy Secretary Thomas Modly didn’t have to resign for giving a profane speech justifying his firing of USS Theodore Roosevelt commander Capt. Brett Crozier, but Trump said he hopes it will end the controversy.

Crozier warned last week that COVID-19 was spreading among his 5,000-man crew. Modly removed him from command, telling his former crew he was “too naive or too stupid” if he believed the email would not leak.

“The whole thing was very unfortunate,” Trump said at a press conference Tuesday night.

“The captain should not have written a letter, he didn’t have to be Ernest Hemingway. He made a mistake but he had a bad day,” Trump said.

He added on Modly’s resignation: “I had heard he did because he didn’t want to cause any disturbance for our country… because he wouldn’t have had to resign, I would not have asked him. I don’t know him. I didn’t speak to him, but he did that I think just to end that problem. And I think in really many ways that was a very unselfish thing for him to do.”

Trump offered Monday to mediate between Modly and Crozier. On Tuesday, Modly resigned after meeting with Defense Secretary Mark Esper, according to reports.

“[Crozier] made a mistake but he shouldn’t have done that, and your secretary probably shouldn’t have said quite what he said,” Trump added.

Trump said he’s going to allow the Pentagon to decide whether Crozier will return to command of the nuclear-powered aircraft carrier, which docked in Guam to offload infected and exposed sailors. Crozier and about 230 subordinates have tested positive for the deadly virus.

The Navy secretary said in a radio interview Friday that Crozier put his ship “at risk” of attack when he sent an email to at least 20 people last week raising concern about the virus sweeping through his crew after men began showing symptoms.