Acting US Navy Secretary Thomas Modly offered his resignation after coming under fire for his handling of a crisis involving the captain of a coronavirus-stricken aircraft carrier, US officials confirmed on Tuesday.

Defense Secretary Mark Esper said he had accepted Modly's resignation offer on Tuesday morning.

"[Modly] resigned on his own accord, putting the Navy and the Sailors above self so that the USS. Theodore Roosevelt, and the Navy, as an institution, can move forward," Esper said in a statement.

Esper said that with President Donald Trump's approval, Army Undersecretary Jim McPherson would take over as acting Navy Secretary.

More:

Modly removed Captain Brett Crozier of his command of the aircraft carrier Theodore Roosevelt after a scathing letter written by the commander urging the Navy to do more to halt the spread of the potentially lethal virus on board the ship the was leaked to the media.

The move sparked intense backlash as videos posted on social media showed sailors on board the vessel cheering Crozier as he departed and an online petition called for his reinstatement. It has also become a political lightning rod as the Trump administration faces intense criticism for its handling of the nation's coronavirus outbreak.

Crozier had started showing symptoms of the coronavirus before he was relieved of his command on Thursday and has tested positive, the New York Times reported, citing two Naval Academy classmates who are close to Crozier.

In a surprise speech to crew members of the aircraft carrier Theodore Roosevelt that was meant to be a private address, Modly defended his decision to relieve Crozier of his command due to the leak.

"If he didn't think that information was going to get out into the public in this information age that we live in, then he was A, too naive or too stupid to be a commanding officer of a ship like this," Modly said on the carrier while it was docked in Guam on Monday.

"The alternative is that he did it on purpose," he added.

Crozier, who took command of the Theodore Roosevelt in November, had written a four-page letter describing a bleak situation on board the carrier as more of his crew began falling ill.

Modly said the letter, and the leak, amounted to a betrayal by the captain, who was responsible one way or another.

US officials verified the recording of Modly's speech heard by Reuters. After an initial statement saying he stood by every word of his speech, Modly later apologised, saying: "I do not think Captain Brett Crozier is naive nor stupid."

President Donald Trump, in a White House briefing, suggested he might be able to resolve the situation.

"You have two good people and they're arguing ... I'm good at settling these arguments. So, I may look into it in great detail, in detail, and I'll be able to figure it out very fast," he said.

Crozier should not have sent his letter, but he did not "want to destroy somebody for having a bad day", Trump said.

Captain Brett Crozier addressing the crew for the first time as commanding officer of the aircraft carrier USS Theodore Roosevelt during a change of command ceremony on the ship's flight deck in San Diego, California, US [ Sean Lynch/US Navy handout via Reuters]

A sailor on board the ship told Reuters that Modly's speech only angered the crew.

"Nobody likes what he had to say ... He made everyone more irritated," said the sailor, who spoke on condition of anonymity.

Crozier's crew members showed their disapproval of Modly's decision by posting videos online last week of their captain's emotional sendoff. Sailors hailed Crozier as a hero, out to defend his crew at great cost to his career.

Chairman of the House Armed Services Committee Adam Smith, a Democrat, called on Monday for Modly's removal.

"Acting Secretary Modly's decision to address the sailors on the Roosevelt and personally attack Captain Crozier shows a tone-deaf approach more focused on personal ego than one of the calm, steady leadership we so desperately need in this crisis," Smith said in a statement.

Democratic presidential contender Joe Biden said Modly "shot the messenger".

In his letter, Crozier called for "decisive action": removing more than 4,000 sailors from the ship and isolating them, and wrote that unless the Navy acted immediately, it would be failing to properly safeguard "our most trusted asset - our sailors."

The letter put the Pentagon on the defensive and alarmed families of those on the vessel.

One US official, speaking on condition of anonymity, told Reuters news agency that military officials had recommended against firing Crozier, arguing that it was better for an investigation to be complete.

The official said Modly was made aware that the White House wanted Crozier out, though it does not appear that Trump directed him to do so.

Earlier on Tuesday, US House of Representatives Speaker Nancy Pelosi added her voice to calls for Modly's removal.

"Sadly, Acting Secretary Modly's actions and words demonstrate his failure to prioritise the force protection of our troops," Pelosi said in a statement.

"He showed a serious lack of the sound judgement and strong leadership needed during this time. Acting Secretary Modly must be removed from his position or resign," Pelosi said.