He had been publicly vilified by President Trump, marched out of his national security office across from the White House, so Lt. Col. Alexander Vindman wanted only to get his mind off politics as he settled in to watch a television show with his grade-school-age daughter Friday evening.

Then his wife returned home with some news: Much of the country had just watched as former vice president Joe Biden implored the audience to give a standing ovation in Vindman’s honor at the nationally televised Democratic presidential debate in Manchester, N.H.

“Stand up and clap for Vindman. That’s not who we are! We’re not what Trump is!” Biden thundered in the name of the Army officer whom Trump had hours earlier ousted from the White House National Security Council in retaliation for his testimony in the House Democrats’ impeachment probe.

To Vindman, the gesture was appreciated, but it felt “surreal” that he has become a lightning rod for the nation’s sharp political polarization in the Trump era, according to a person familiar with the events surrounding his ouster, who spoke on the condition of anonymity for fear of retribution. After all, as a military officer, Vindman had been trained to avoid overt displays of partisanship or politics.

Yet if Vindman was hoping to move past his removal, the president had other ideas. On Saturday, Trump escalated his public attacks, impugning Vindman as “very insubordinate.” The attacks came as part of Trump’s purge of key figures who testified in the Ukraine impeachment saga, which has sent a chill throughout the federal bureaucracy, with other career officials fearful of retaliation.

In a pair of tweets, Trump asserted he has never met Vindman but cast him as a rogue underling at the NSC who undermined his superiors, even though a lawyer for Vindman said he received “exemplary” reviews during his White House service.

Vindman “was very insubordinate, reported contents of my ‘perfect’ calls incorrectly” and “was given a horrendous report by his superior, the man he reported to,” Trump wrote, referring to phone conversations with the Ukrainian president that were central to the impeachment inquiry. “In other words, ‘OUT’.”

Trump’s attack came as Vindman spent the day at his home in Northern Virginia overseeing a birthday party for his daughter, the president’s denunciation an ugly coda to the months-long political crossfire after Vindman’s dramatic testimony in the impeachment hearings.

On Friday, Vindman was escorted out of his third-floor office at the Eisenhower Executive Office Building — the first, dramatic step by the president to enact payback against those he felt betrayed him during the House impeachment investigation.

Trump simultaneously ordered the ousting of Vindman’s twin brother, Yevgeny, a chief ethics lawyer at the NSC who did not testify in the impeachment probe, and recalled Gordon Sondland, a Trump campaign donor who served as U.S. ambassador to the European Union. Sondland had testified that the president sought a quid pro quo in tying U.S. foreign aid to Ukraine’s president launching an investigation of Biden.

Alexander Vindman’s lawyer Michael Volkov responded to Trump on Saturday by emphasizing that Vindman will land “at a good spot” at the Pentagon, where he will be assigned until July 1, when he is to begin a new posting at the Army War College.

“Clearly the Army is not participating in the president’s desire to retaliate,” he said.

But beyond the Vindman brothers, career officials and political appointees who had testified in Ukraine hearings remained worried about their future under a president who has emerged emboldened from the Republican-controlled Senate’s vote to acquit him on both impeachment charges — abuse of power and obstruction of Congress — and eager to punish those he believes have betrayed him.

There are doubts among officials at the State Department and the Pentagon about whether their bosses would protect them if Trump broadens his purge. Both Secretary of State Mike Pompeo and Defense Secretary Mark T. Esper have been careful not to break with the president during the Ukraine crisis. Pompeo, in particular, has lashed out at reporters who have asked him about his refusal to defend Marie Yovanovitch, the former U.S. ambassador to Ukraine.

“You look around and you see the adverse actions taken against people who testified under subpoena and it creates a real air of uncertainty,” said a lawyer for one of the witnesses, who spoke on the condition of anonymity for fear of retribution from the White House.

On Saturday, neither of the two current State Department officials who testified — David ­Holmes, a Foreign Service officer at the U.S. Embassy in Kyiv, and George Kent, a career official who served as deputy assistant secretary of state for European and Eurasian affairs — had been notified of any change in their employment, people familiar with both cases said.

Trump’s “personal insecurities and vindictiveness are making our nation less secure,” Sen. Jack Reed (D-R.I.) said in a statement. The president’s punitive actions signal he “won’t tolerate people who tell the truth.”

White House aides had sought to frame the Vindman brothers’ ousting as part of a broader downsizing of the NSC that has been taking place for more than a year. National security adviser Robert O’Brien has said he intends to pare the agency from a peak of more than 200 staff members, many of whom are career officials detailed from the Pentagon, State Department and other agencies, to about 100, mostly through attrition.

But the actions against the Vindman brothers and Sondland, just a day after the president marked his acquittal with an angry speech in the White House’s East Room, led Trump’s critics to dub it the “Friday night massacre” — a replay of the “Saturday night massacre” when President Richard Nixon forced out several senior Justice Department officials during the Watergate scandal in 1973.

“Every career official will tell you it’s not just chilling but frightening,” said Fernando Cutz, who served on the NSC as a senior adviser to then-national security adviser H.R. McMaster before they both left in 2018. “You’re seeing things happen in an unprecedented way that even Nixon didn’t do. . . . The broader message to career officials is that you can’t speak up. Even if you see something illegal, something unethical, you can’t speak up. That’s the message the president wants to send.”

In recent weeks, the Vindman brothers began clearing out personal effects from their NSC offices, concerned that they might be suddenly ousted and not given a chance to collect their belongings. Associates said the White House made clear that the Vindman brothers were to be isolated even as they continued to report to work.

On Ukraine policy, Alexander Vindman was “sidelined,” said Cutz, who keeps in touch with staffers who are still serving. “He hasn’t been playing a key role. He had not been in the room.” White House officials instructed NSC staff to bypass Yevgeny Vindman on ethics matters and take questions directly to the White House Counsel’s Office, Cutz said.

Alexander Vindman informed his superiors at the NSC and in the Army that he wished to leave his White House job at the next rotation opportunity, which would have meant departing by the end of this month.

Trump ensured that there would be no quiet departure for Vindman, whose name he often spoke in seething and mocking tones.

White House aides said the president’s anger stems from his belief that Vindman passed along information about the president’s July 25 phone call with Ukrainian President Volodymyr Zelensky to another government official who ultimately came forward as an anonymous whistleblower to report Trump’s call as inappropriate. Trump has denied wrongdoing and said he was trying to pressure Zelensky to do more to clean up corruption in his country.

Of all those who testified in the House investigation, Trump was most determined to punish Vindman, aides said, and he wanted to do it Wednesday after the Senate voted to acquit him. But the aides persuaded the president to delay the action in hopes of enjoying positive news coverage over the acquittal, an aide said.

Robert Spalding, a retired Air Force general who was ousted from a job at the NSC in early 2018 after his memo arguing for a government takeover of the 5G industry was leaked, defended Trump’s actions. Spalding said the NSC is inherently a politicized job.

“It doesn’t matter what the reason is,” Spalding said. “Of course, the president has every right. It’s his NSC. It’s his personal staff.”

Vindman’s final day on Trump’s staff ended when a security officer and the NSC’s senior director for personnel management showed up at his office door and escorted him downstairs to an exit from the White House grounds on 17th Street, according to the person familiar with his thinking.

It was there that he encountered his brother, who arrived moments later. The two were prepared, having brought NSC computers and other items from their homes to turn in, and four plainclothes security officials followed them to a nearby parking lot to retrieve those items, the person said.

Then the twin brothers commuted to their separate homes in suburban Virginia — just a block away from one another — in a final carpool.

Josh Dawsey, Anne Gearan, Tom Hamburger, John Hudson, Greg Jaffe, Julie Tate and Ellen Nakashima contributed to this report.