President Trump chose a bad time to launch a purge of his national security team.

After he was acquitted in his Senate impeachment trial on Feb. 6, Trump said it was high time to get rid of anyone on his staff who isn’t completely devoted to his every wish.

“We want bad people out of our government!” he bellowed on Twitter.

So heads began to roll.

Army Lt. Col. Alexander Vindman, the top Ukraine expert on the National Security Council staff who had the temerity to testify in the House impeachment hearings, was ordered out of the White House. So was Vindman’s twin brother, who was ousted mainly for having the same last name.

“OUT,” Trump tweeted triumphantly.

Jessie Liu, whom Trump appointed as U.S. attorney for the District of Columbia in 2017, was abruptly told her nomination for a top job in the Treasury Department was canceled. Her principal offense, it appears, was failing to indict Andrew McCabe, a former FBI official whose prosecution the president desired.

Joseph Maguire, Trump’s acting director of national intelligence, was summarily sacked after one of his deputies told the House Intelligence Committee that Russia hopes the president wins the November election — news the candidate did not want Congress to hear.

Those are not the only victims of Trump’s search for underlings who fail his hair-trigger test of personal loyalty — and they probably are not the last.

White House personnel director Johnny McEntee reportedly is running a full-scale purge fueled by denunciations supplied by Trump loyalists.

A president is entitled to hire aides who support his policies, and to remove aides who don’t. But these professionals weren’t fired for disloyalty; they were fired for honesty.

And each of their stories came with a pointed lesson for others in Trump’s administration: Either fall in line, or face retribution.

In the case of Vindman, the president made clear that he thought the Army should consider disciplinary proceedings to punish the decorated combat veteran for talking to Congress.

“They’re going to certainly, I would imagine, take a look at that,” Trump said. The secretary of the Army, to his credit, said he would do no such thing — but it’s difficult to imagine Vindman’s career prospects are bright.

In the case of Liu, the lesson to other prosecutors was chilling: If the president wants one of his critics indicted, your job is to deliver an indictment.

Liu was also faulted by pro-Trump conservatives for allowing prosecutors to recommend a tough sentence for Roger Stone, the Trump confidant convicted of seven felonies. Second lesson for her Justice Department colleagues: If you want to get ahead, go easy on the president’s pals.

In the case of Maguire, the moral is that Trump wants to control what his intelligence agencies tell Congress — and whatever they say should never contradict his views.

Intelligence chiefs got the message. They have quietly asked Congress to cancel their annual public hearings on global threats to avoid repeating the unpleasant experience they had a year ago, when their testimony on North Korea and Iran earned them angry condemnation from the president.

That’s an especially chilling lesson because of the long history of presidents manipulating intelligence to support the policies they prefer — most notably George W. Bush’s use of distorted intelligence to justify his 2003 invasion of Iraq.

And that brings us to the crisis of the moment: the coronavirus.

Can we be confident that President Trump and his aides are doing everything they can to stop what is now a limited outbreak in the United States from becoming an epidemic, as it has in China, Italy and other countries?

Are they letting the government’s best scientists and emergency planners handle the problem without political interference?

The early signs aren’t encouraging. The first thing the president did, once he realized he had a full-blown crisis on his hands, was to seize control of the public message.

“Because of all we’ve done, the risk to the American people remains very low,” he said, congratulating himself on his decision to stop flights from China — but contradicting the scientific assessments of the Centers for Disease Control and Prevention. Then he appointed his most loyal political lieutenant, Vice President Mike Pence, to coordinate the government’s not-yet-clearly-coordinated response.

One of the White House’s first actions was to tell highly respected medical experts like Anthony Fauci of the National Institutes of Health that they are no longer authorized to speak publicly without approval.

And when a senior official at the Department of Health and Human Services complained that health workers were given insufficient training or protective gear before they dealt with Americans evacuated from countries with coronavirus in Asia, her bosses’ first reaction — at least according to her whistleblower complaint — was to threaten her job.

None of that inspires confidence at a time when it’s needed most.

A president is entitled to honest advice and faithful service from his staff. But a president who demands blind loyalty to his whims will get neither.

McManus’ column appears on Sunday and Wednesday.