The Navy on Thursday removed the captain of an aircraft carrier crippled by the coronavirus, two days after a blunt letter the officer wrote warning the service of the need to get more sailors off the vessel created a furor.

Navy Capt. Brett Crozier, the commanding officer of the USS Theodore Roosevelt, was relieved of command at the direction of acting Navy secretary Thomas Modly.

The Navy had become increasingly convinced that Crozier was involved in leaking the letter to the news media to force the service to address his concerns over the outbreak on his ship, a defense official said, speaking on the condition of anonymity because of the sensitivity of the issue.

Modly said that Crozier showed “poor judgment” by sending the letter by email to 20 or 30 people. He did not directly accuse Crozier of leaking the letter but noted that it appeared in Crozier’s hometown newspaper.

“I could reach no other conclusion than that Capt. Crozier had allowed the complexity of his challenge with the covid breakout on his ship to overwhelm his ability to act professionally, when acting professionally was what was needed most at the time,” Modly said at the Pentagon. “We do and we should expect more from the commanding officers of our aircraft carriers.”

Modly added a few minutes later that he did not mean to insinuate that he knew Crozier leaked the letter and believed the captain “did what he thought was in the best interest of the safety and the well-being of his crew.”

But Modly said the letter, first reported by the San Francisco Chronicle on Tuesday, undermined more senior Navy leaders and could have emboldened adversaries of the United States in the Pacific region. Modly said that Crozier had been told that he could communicate directly with Modly’s office.

“It creates a panic, and it creates the perception that the Navy is not on the job, the government’s not on the job, and it’s just not true,” Modly said.

Modly said the decision to remove Crozier was his, and that he received no pressure from the White House on the issue. He said that he notified Defense Secretary Mark T. Esper of his plan on Wednesday afternoon and that Esper indicated he would support him.

The Navy’s top officer, Adm. Michael Gilday, stood alongside the acting secretary as he made the announcement. Gilday said he has called for an investigation across all naval forces in the Pacific to examine the issue.

Crozier, who has not responded to requests for comment, sent the letter dated Monday decrying the pace at which the service was removing sailors from the ship in Guam amid a coronavirus outbreak. Crozier asked that 90 percent of the crew, comprising more than 4,800 sailors, be removed to allow for testing, quarantining and disinfecting of the ship.

“Decisive action is required. Removing the majority of personnel from a deployed U.S. nuclear aircraft carrier and isolating them for two weeks may seem like an extraordinary measure,” he wrote. “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.”

Modly said that Crozier created some panic by suggesting that sailors could die. All of the sailors who have tested positive so far have had either moderate or mild flu symptoms, or no symptoms at all, Modly said.

Some 113 members of the crew had tested positive as of Thursday, Modly said, predicting that “hundreds” ultimately could. By far, it is the U.S. military’s largest coronavirus outbreak to date in the pandemic.

The captain will soon be replaced by the ship’s former commanding officer, Capt. Carlos Sardiello, who already has been selected for promotion to rear admiral.

Family members of sailors aboard the Theodore Roosevelt had expressed growing concern before the letter’s publication that the Navy was moving too slowly in getting sailors off the ship.

The mother of a sailor who tested positive for the virus and was evacuated from the ship said she and most commenters in closed Facebook groups for family members of the crew backed Crozier.

“My husband and I are still grateful that he asked for help, and said that what was going on wasn’t adequate. In our eyes, he saved I don’t know how many people on his ship,” the mother said, speaking on the condition of anonymity to avoid identifying her child.

Modly’s decision, first reported by Reuters, comes one day after Modly said that there was nothing wrong with Crozier’s writing the letter but that leaking it to the media “would be something that would violate the principles of good order and discipline.”

“How it got out into the media I don’t know,” Modly said. “I don’t think anyone would ever know.”

Gilday and Modly both said Wednesday that they encouraged commanders to continue raising their concerns. About 1,000 sailors must remain on the ship at all times to man weapons, nuclear reactors and other sensitive equipment, and some 2,700 would be off the ship for testing and quarantining within days, the Navy said.

“We’re not looking to shoot the messenger here,” Gilday had said of Crozier on Wednesday.

Julie Tate contributed to this report.