Videos that emerged on social media showed crew members of the USS Theodore Roosevelt aircraft carrier cheering their captain in a walloping send-off, after the Navy removed him Thursday for speaking up in a leaked letter to his superiors about what he saw as insufficient measures to contain a coronavirus outbreak aboard the vessel.

Footage posted on Facebook and Twitter appears to show hundreds of service members crowding into a hangar around Capt. Brett Crozier as he makes his way off the vessel over a gangway to Guam, a backpack slung over his shoulder. The sailors chant “Captain Crozier!” over and over, clapping and cheering. In one of the videos, a voice in the background says: “And that’s how you send out one of the greatest captains you ever had!”

In one of the videos, Crozier stands a few feet from his crew, awash in applause as a vehicle waits to take him away. He waves and salutes, then turns to walk away alone.

The video footage not only demonstrated the support for Crozier aboard the aircraft carrier but also showed what appeared to be hundreds of sailors gathering closely in a large group — the sort of environment that health officials have warned can lead to rapid transmission of the virus.

The groundswell of support for Crozier — which extended to comments from crew members and their families — came as the latest episode in a drama over the coronavirus outbreak on the Nimitz-class nuclear-powered aircraft carrier. The saga has shined a harsh spotlight on Pentagon leadership accused of failing to act swiftly and aggressively enough to stop a rapid spread of disease among the carrier’s nearly 5,000-person crew, accusations that top Pentagon officials deny.

The controversy over the carrier also risked becoming increasingly political, as Democratic senators and congressmen called for a Pentagon inspector general investigation into Crozier’s firing and former vice president Joe Biden, President Trump’s likely rival in the November election, went public with support for the ousted commanding officer.

“Captain Crozier was faithful to his duty — both to his sailors and his country,” Biden tweeted. “Navy leadership sent a chilling message about speaking truth to power. The poor judgment here belongs to the Trump Admin, not a courageous officer trying to protect his sailors.”

In a letter to senior officials on Monday, subsequently leaked by an anonymous source to the San Francisco Chronicle, Crozier asked that 90 percent of the ship’s crew be moved into isolation for two weeks on Guam, warning that if the leadership didn’t take such extraordinary measures, “we are failing to properly take care of our most trusted asset — our Sailors.”

The Pentagon has rejected the type of full-scale evacuation Crozier sought, saying the ship must remain ready at any time and about 1,000 service members must be aboard to safeguard the ship and its weapons. The situation aboard the Roosevelt is by far the U.S. military’s largest coronavirus outbreak to date.

U.S. aircraft carriers, floating cities powered by nuclear reactors, are symbols of the nation’s global projection. The Navy has 11 active carriers in its inventory. The consequences of taking one offline — especially a ship assigned to patrol the Pacific as a check on China’s military power — would be enormous, but Crozier argued it was necessary to protect the health of his crew.

As of Friday, 41 percent of the Roosevelt crew had been tested for covid-19, with 137 coming back positive, the Navy said. Four hundred more sailors who tested negative were slated to move into Guam hotels for quarantine on Friday evening, bringing the total of those moved to 576. There have been zero hospitalizations.

Comments from acting Navy secretary Thomas Modly to the crew during his announcement of Crozier’s dismissal on Thursday were posted to the ship’s official Facebook page early Friday.

“I am entirely convinced that your Commanding Officer loves you, and that he had you at the center of his heart and mind in every decision that he has made,” Modly said. “I also know that you have great affection, and love, for him as well. But it is my responsibility to ensure that his love and concern for you is matched, if not exceeded by, his sober and professional judgment under pressure.”

Modly said Thursday that Crozier had shown “poor judgment” in sending his letter by email to 20 or 30 people. Modly didn’t directly accuse Crozier of leaking the letter to the San Francisco Chronicle but noted it appeared in the captain’s hometown newspaper. The Navy is conducting an internal investigation into the matter.

Modly argued that Crozier’s letter undermined more senior Navy leaders and could have emboldened adversaries of the United States in the Pacific region. He said the decision to remove Crozier was his, and that he received no pressure from the White House on the issue.

Speaking to the press on Friday, Pentagon spokesman Jonathan Hoffman said that Defense Secretary Mark T. Esper had supported Modly’s decision “based on the secretary of the Navy . . . informing the secretary of defense that he had lost confidence in the captain.”

A Navy helicopter pilot turned businessman, Modly took over as the Navy’s top civilian leader late last year after his predecessor was fired amid a controversy over Trump’s personal intervention in a Navy SEAL war crimes case.

In an interview with radio host Hugh Hewitt on Friday, Modly said Crozier’s chain of command began with the strike group commander — a rear admiral housed on the same carrier.

“Instead of going to that particular admiral’s cabin and sitting down and talking with him about his concerns and coming up with a strategy with him on how to address them, he decided to send an email and copy that email to a large list of other people who were not in the chain of command, and sent it up also through the chain of command skipping people in the chain of command,” Modly said. “And that, to me, just represented just extremely poor judgment, because once you do that in this digital era, you know that there is no way that you can control where that information’s going to go.”

Modly also said he had set up a direct line to Crozier, and had asked the captain to use it if he needed help or felt anything was going poorly. “And he did not do that,” Modly said.

The acting Navy secretary suggested that the public airing of the crisis was dangerous, recalling the saying “loose lips sink ships,” in what appeared to be an implicit warning to other sailors to not speak publicly about the situation on the carrier. At the same time, Modly emphasized that he had held three news conferences to discuss the outbreak aboard the Theodore Roosevelt since last week, detailing the number of confirmed coronavirus cases.

It isn’t yet clear what specifically led Crozier to write and send the letter. Crozier was relieved of his duties but remains a captain in the Navy. He could not be reached for comment.

By the time Crozier’s letter was written, the Navy had already made public the fact of a coronavirus outbreak on the Roosevelt, confirming publicly on March 24 that three sailors had tested positive and been quarantined. What the letter revealed, when it leaked, was apparent dissatisfaction on the carrier with the pace at which the Navy was removing sailors from the ship and taking other measures.

It captured concerns that family members of sailors on the ship had been expressing for days.

“I thought his letter touched on all the points that us, as family members, were feeling,” said the mother of a sailor on the vessel who has since tested positive for coronavirus.

More broadly, family members of Roosevelt sailors, speaking on the condition of anonymity because of concerns about retaliation against their sailors, have expressed support for Crozier and gratefulness for his willingness to speak up.

The father of one sailor told The Washington Post that he thinks the crew understands the decision to relieve Crozier of his command, but the video of sailors chanting his name as he departed “speaks loudly of how much they appreciate what a true Navy commanding officer is all about.”

“He is a hero in my book who cares tremendously for the well-being of my daughter and all her shipmates,” the father said.

The mother of another sailor said that her son’s best friend on the ship had tested positive for coronavirus, and her son is waiting for his own test. In the meantime, medical professionals are taking his temperature twice a day, and he is sleeping on a cot in a gymnasium with hundreds of other sailors.

“I FaceTimed with him last night, and I looked and I said, ‘That doesn’t like those cots are six feet apart,’ ” the mother said. “They’re still not in hotels. They’re all playing cards. They’re all doing their things, and nothing is being done with these sailors.”

Another parent, Margalis Fjelstad of Green Valley, Ariz., said that her daughter tested positive for the virus and was removed from the ship early in the week. She is now quarantined with a few other women from the crew who have demonstrated symptoms of the virus.

“She’s feeling exhausted,” Fjelstad said. “She sleeps most of the day, and a lot of times she’s up and down at night. Her temperature is spiking, then coming down and going up again. Tuesday and Wednesday, we weren’t able to talk on the phone because she couldn’t talk and breathe at the same time.”

Fjelstad said she is “horrified” that the Navy relieved the captain of command.

“I think it was outrageous that he would be relieved of duty while trying to protect the sailors under his command,” she said. “It just seems against the values of the Navy.”

The bond between ship commanders and crew is distinct from every other military command, fused at the “elemental level” in an understanding of the unique power and responsibility a skipper wields, said Bryan McGrath, a former commander of a Navy destroyer.

So the emotional outpouring among crew and their families was not unprecedented, McGrath said, and Crozier is not the first commander who has received such a send-off. But the feelings were obvious, he said.

McGrath, now a defense consultant, counts the Navy as one of his clients. He said it was apparent both Crozier and Navy leaders believed they were doing the right thing.

“I think both sides have a piece of right here,” McGrath said. “Crozier made his stand. When he wrote that letter, he almost certainly knew it may end up like this.”

Missy Ryan contributed to this report.