WASHINGTON -- President Donald Trump's abrupt, late-night firing of the acting U.S. attorney general sends a clear message to his future Cabinet about his tolerance for public dissent.

The president will soon have in place like-minded political appointees, not inherited officials like Sally Yates who refused to allow the Justice Department to defend his immigration orders in court. And they will be less inclined to publicly disagree with him.

But his haste in firing an Obama administration holdover, his spokesman's admonishment that career employees should "either get with the program or go" and Trump's comments about issues he wants federal prosecutors to investigate all illustrate how he moves aggressively to ensure his directives are carried out, even at agencies like the Justice Department that cherish their independence.

Over the decades, there has "been respect for the independence of the Justice Department as a law enforcement agency," said Bill Baer, a high-ranking department official during the Obama administration. "There is reason for grave concern that the incoming president views the Justice Department just as another political weapon to go after people who disagree with him."

White House spokesman Sean Spicer said Yates was "rightfully removed" from "a position of leadership that is given to someone who is supposed to execute orders that are handed down to them properly." While every American has the right to express an opinion, he said, the attorney general is "required to execute lawful orders."

A scheduled Senate committee vote on Sen. Jeff Sessions, Trump's nominee for the Cabinet post, was postponed Tuesday. Democrats cited the firing as a basis for the delay and some said they had no confidence Sessions would be able to stand up to Trump.

Monday night's firing of Yates, a career prosecutor appointed to a political position by Democrats, underscored the growing dissent -- even among some Trump administration officials -- over his executive order that halted America's refugee program and suspended immigration from seven Muslim-majority nations. Yates' refusal to defend the order was largely symbolic since Sessions would almost certainly support it once sworn in.

Yet the public clash between a president and his chief law enforcement officer over the legality of a consequential policy could affect the willingness of Sessions, or any other Cabinet appointee, to say no to Trump.

Sessions himself, at confirmation hearings for Democratic-appointed Justice Department officials -- including Yates -- has repeatedly demanded that they declare their willingness to stand up to the White House. He asked Yates at a 2015 hearing if she believed the attorney general or his or her deputy had "the responsibility to say no to the president if he asks for something that's improper."

Yates replied that the attorney general must follow the law and provide "independent legal advice to the president."

Sessions declared at his own confirmation hearing that he understood the importance of disagreeing with the president.

"You simply have to help the president do things that he might desire in a lawful way and have to be able to say no, both for the country, for the legal system and for the president, to avoid situations that are not acceptable," he said.

That's not always easy.

During the campaign and after taking office, Trump has waded into legal matters in ways that could call into question the Justice Department's vaunted independence.

He said at one point he didn't think Hillary Clinton should be investigated further for her email practices, even though such a decision would surely be up to the FBI and Justice Department. He also demanded an investigation into allegations of voting fraud without presenting evidence of a problem, though federal lawyers would almost certainly need reasonable suspicion to embark on a probe.

Justice Department officials have long asserted their independence from the White House, and in some cases have lost their jobs or were prepared to lose them.

Famously, as deputy attorney general under George W. Bush, current FBI Director James Comey clashed with White House officials in the hospital room of Attorney General John Ashcroft over the reauthorization of a government surveillance program and later prepared his resignation. A Nixon-era attorney general and his deputy both resigned rather than fire an independent prosecutor investigating the Watergate scandal.

There's also precedent for the Justice Department declining to enforce laws that its leader believed unlawful, including when Attorney General Eric Holder in 2011 said the department would stop enforcing the Defence of Marriage Act.

Former Attorney General Loretta Lynch on Tuesday praised Yates' stance as part of that tradition, saying the department's "first duty is always to the American people."

Though Democrats applauded Yates, the Trump White House and other Republicans argued that she abdicated her responsibility.

George Terwilliger, a deputy attorney general under President George H.W. Bush, said the honourable thing to do in a "crisis of conscience" is to quietly resign. Disagreeing with the law, he said, is no excuse for not enforcing it.

"It undermined the independence of the institution of the Justice Department," Terwilliger said of Yates' announcement, "and was an affront to the career men and women of the Justice Department who every day have to go into court and represent the position of the United States -- whether they agree with it or not."