But a Navy official familiar with the situation but not authorized to speak publicly about it said that the captain had repeatedly asked his superiors for speedy action to evacuate the ship. His letter, the official said, came because the Navy was still minimizing the risk.

Mr. Modly insisted that his firing the captain for writing a letter asking for more help does not mean that subordinate officers are not allowed to raise criticisms and ask for assistance. “To our commanding officers,” Mr. Modly told reporters on Thursday, “it would be a mistake to view this decision as somehow not supportive of your duty to report problems, request help, protect your crews, challenge assumptions as you see fit.”

But the removal of Captain Crozier will likely have a chilling effect on the willingness of commanders to bring bad news to their superiors.

“There’s no question they had the authority to remove him,” Kathleen H. Hicks, a former top Pentagon official in the Obama administration, said in an email. “The issue is one of poor judgment in choosing to do so. They are fueling mistrust in leader transparency, among service members, families, and surrounding/hosting communities.”

Ms. Hicks, who is now at the Center for Strategic and International Studies in Washington, added that the episode “lays bare the broader incompatibility in the Defense Department’s dual-track approach of attempting to tightly control and centralize its strategic communications at the same time it has adopted a highly decentralized approach to combating the coronavirus.”

Representative Ruben Gallego, Democrat of Arizona, is a former enlisted Marine who saw heavy combat in Iraq. In an interview Friday, he described the Navy’s actions in firing Captain Crozier as “dangerous.”

“For the men and women on the Roosevelt and across the Navy, the message is this,” Mr. Gallego said. “If the commander is looking out for you and doesn’t go about it the right way he’s going to get punished. It’s dangerous, it’s going to impact morale and retention rates.”