Acting Navy Secretary Thomas Modly announced Thursday that the commanding officer of the aircraft carrier USS Theodore Roosevelt, now docked in Guam, was relieved "at my direction."

Navy Capt. Brett Crozier, the carrier’s commander, was sacked after he was accused of leaking a letter to the media that went "outside the chain of command" pleading for help after more than 100 sailors on board tested positive for the coronavirus, and nearly 100 others are suspected of contracting the virus.

Modly said: "This decision is not one of retribution."

"I did not come to this decision lightly," he said. "I have no doubt in my mind [Captain] Crozier did what he thought was in the best interest [of] the safety and well being of his crew. Unfortunately, he did the opposite."

"It unnecessarily raised alarms with the families of our sailors and Marines with no plan to address those concerns," Modley continued. "It raised concerns about the operational security and operational capability of that ship that could have emboldened our adversaries to seek advantage and it undermined the chain of command."

CLICK HERE FOR FULL CORONAVIRUS COVERAGE

Modly said he didn't mind Crozier raising concerns, but "it was the way in which he did it."

Modly said it "created panic on the ship" and "misrepresented the facts," adding that Americans back home were "panicked."

Modly said more than 100 sailors have tested positive and there will be more, but said all the cases are "mild."

Modly said Crozier created a panic by suggesting 50 sailors could die.

"It raised alarm bells unnecessarily," he told Fox News’ Jennifer Griffin.

Modly said the commanding officer could have reached out to him directly, but didn't.

He was also not happy the letter was sent out over email that is "not secure."

Modly said he thought the skipper became "overwhelmed" at the situation and acted unprofessionally and violated the "sacred trust" given to all commanding officers in the Navy.

"It demonstrated poor judgement in the middle of a crisis," Modly said.

Navy Secretary Thomas Modly, right, said the ship's commander, Capt. Brett Crozier, left, "demonstrated extremely poor judgement" in the middle of a crisis. (AP)

The ship, with a crew of nearly 5,000, is docked in Guam, and the Navy has said as many as 3,000 will be taken off the ship and quarantined by Friday. More than 100 sailors on the ship have tested positive for the virus, but none are hospitalized at this point.

The captain raised warnings this week in a memo to his leaders. He said the ship was facing a growing outbreak of the coronavirus and he asked permission to isolate the bulk of his crew members onshore, an extraordinary move to take a carrier out of duty to save lives.

Crozier said the spread of the disease was accelerating and that removing all but 10 percent of the crew would be a “necessary risk” to stop the spread of the virus.

“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,” Crozier said.

Fox News’ Griffin had previously questioned Modly: “When we asked about this last week, you said that you had no evidence that it was the port visit to Vietnam. Have you changed your assessment in light of the exponentially rising numbers? And was it the letter from the Captain that caused you to start to take -- move faster to remove people from the ship? And is the Captain going to be punished for having raised this in -- in very stark terms?”

Navy leaders were quick to praise the captain for bringing the dire nature of the matter to their attention. They brushed away suggestions that he could be punished because the issue became public so quickly.

"This is exactly what we want our commanding officers and medical professionals to do," Modly said.

"We're not looking to shoot the messenger," he added.

CLICK HERE FOR COMPLETE CORONAVIRUS COVERAGE

The letter from Crozier to top Navy brass was first obtained by the San Francisco Chronicle.