Acting Navy Secretary Thomas Modly has resigned, CNN and Politico reported on Tuesday.

Modly's offer to step down came a day after he visited the USS Theodore Roosevelt in Guam and delivered an impassioned 15-minute speech to the crew slamming the ship's former commanding officer and lashing out at China and the US media.

Visit Business Insider's homepage for more stories.

Acting Navy Secretary Thomas Modly, who fired the commanding officer who pleaded with the Navy for help with a coronavirus outbreak on his aircraft carrier, resigned on Tuesday, capping off weeks of controversy as the service struggles to contain the virus.

Modly's resignation was first reported by CNN and Politico. Defense Secretary Mark Esper confirmed in a statement that he had accepted Modly's resignation.

"He 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," the statement said. "His care for the sailors was genuine."

In a resignation letter first obtained by USNI, Modly said it was "with a heavy heart" that he voluntarily left the Navy.

"It has been the honor of my life to serve as the Under Secretary of the Navy and for the last five months, the Acting Secretary of the Navy," Modly's letter to Esper said. "I am thankful for the confidence both you and President Trump have expressed in me to discharge these weighty duties on behalf of our Sailors, Marines, and the American people.

"More than anything, I owe every member of the Navy and Marine Corps team a lifetime of gratitude for the opportunity to serve for them, and with them, once again," he added.

James McPherson, the Army undersecretary, is expected to replace Modly, The Wall Street Journal reported. McPherson previously served as an enlisted soldier in the Army, later joining the Navy's Judge Advocate General's Corps and rising to the rank of rear admiral.

Modly had on Monday visited the USS Theodore Roosevelt in Guam, where he lashed out at the ship's former commanding officer, the media, and China in an impassioned, expletive-laced 15-minute speech to its 4,800 service members.

The leaked audio prompted numerous Democratic lawmakers, including House Speaker Nancy Pelosi, and Tweed Roosevelt, the great-grandson of President Theodore Roosevelt, to call for Modly to step down.

In his speech, Modly outlined his reasoning for removing Capt. Brett Crozier on Thursday, after Crozier wrote a four-page letter urging his Navy colleagues to implement a "political solution" and take "immediate and decisive action" as the ship dealt with a coronavirus outbreak.

As of Tuesday, over 200 service members aboard the ship, as well as Crozier, had tested positive for the coronavirus.

The letter was eventually leaked to the San Francisco Chronicle, which published its contents last Tuesday. It was not immediately clear how the letter found its way to the newspaper, but the Defense Department said it launched an investigation.

It was also unclear who the recipients of the letter were. Modly said it was addressed to over 20 people.

In his speech, Modly accused Crozier of violating military protocols and circumventing the chain of command by sending the letter to a group of people. He said there was a "proper way" for Crozier to handle his concerns, including allowing his immediate supervisor, who was aboard his ship, to address them.

"I have no doubt in my mind that Capt. Crozier did what he thought was in the best interest and well-being of his crew," Modly said. "Unfortunately, it did the opposite."

Capt. Brett Crozier. US Navy/MCS 3rd Class Nicholas Huynh

There was a firestorm of criticism after Modly's speech was leaked to several media organizations, including Insider. In it, Modly explained his reasons for the firing and expressed support for the crew.

"It was my opinion that if he didn't think that information wasn't going to get out into the public, in this information age that we live in, then he was A., too naïve or too stupid to be the commanding officer of a ship like this," Modly said. "The alternate is that he did it on purpose."

Modly, who once served in the Navy as a helicopter pilot, described Crozier's actions as "a betrayal" and "a big controversy" that created "a martyr CO."