WASHINGTON -  US President Donald Trump has crushed the most defiant display yet of official opposition to his immigration and refugee restrictions - but resistance continued to spread Tuesday, inside and outside the government.

Trump’s swift dismissal of acting attorney general Sally Yates for refusing to defend his executive orders capped a night of high drama, Washington-style, that drew comparisons with a flurry of urgent housekeeping by a desperate Richard Nixon at the height of the Watergate scandal.

Trump came out fighting Tuesday morning, accusing Democrats of delaying approval of his nominee for attorney general and the rest of his cabinet.

“They should be ashamed of themselves! No wonder D.C. doesn’t work!” Trump wrote on Twitter.

But as Trump defended his sudden executive order barring the entry of people from seven mainly Muslim countries and halting the US refugee resettlement program, challenges were mounting on all sides - from the United Nations to lawmakers in his Republican Party.

US Senate Democrats on Tuesday blocked committee votes on two of Donald Trump’s nominations for key posts, heightening tensions over the new president’s cabinet picks as he blasts the opposition party for obstruction.

“Today Senate Finance Democrats refused to move forward with nominations of Mnuchin & Price,” Senator Ron Wyden, top Democrat on the finance committee, said on Twitter, referring to Treasury secretary nominee Steven Mnuchin and Tom Price, Trump’s pick for health secretary.

Democrats, alarmed by what they see as extreme picks for a raft of key posts and angered by Trump’s aggressive first week in office, appear to have dug in their heels.

Massachusetts on Tuesday joined a legal effort to block US President Donald Trump’s order banning travel from seven Muslim-majority countries, which the state’s attorney general has said is unconstitutional.

Attorney General Maura Healey, a Democrat, said her office was joining the lawsuit filed in federal court on Friday challenging the ban and also filing its own lawsuit seeking to have the ban struck down. Over the weekend, a federal judge in Boston, home to Logan International Airport, blocked Trump’s order from being enforced for seven days.

The order has led to the detention of more than 100 people at US airports and mass protests in many cities, and raised howls of protests abroad.

Critics including in Trump’s own camp complain that the order is too broad and was rolled out hastily, reportedly without consultation with key officials who would be tasked with overseeing it.

Homeland Security Secretary John Kelly insisted Trump’s top advisors were not caught unawares by the unveiling of the order on Friday, saying “high-level folks in the government, attorneys as well” were consulted on the draft. UN Secretary-General Antonio Guterres nevertheless sharpened his criticism of the ban, saying that “blind measures, not based on solid intelligence, tend to be ineffective.”

As former national security officials warned that the order sends exactly the wrong message to Muslims - that America is at war with them over their faith - even US diplomats are jumping into the fray in a rare display of dissent in an administration just a week old.

Trump’s order bars US entry for travellers from seven mainly Muslim countries - Iran, Iraq, Libya, Somalia, Sudan, Syria and Yemen - for 90 days. It also suspends the arrival of all refugees for at least 120 days, and Syrian refugees indefinitely.

The order has also drawn criticism that it amounts to a religious test for refugees aimed at barring entry to Muslims.

“While not explicitly a religious test, it comes close to one which is inconsistent with our American character,” Republican Senator Lamar Alexander said.

Several federal judges have since filed temporary stays against the decree’s implementation.

On Sunday, attorneys general from 16 US states, including California and New York, condemned Trump’s directive as “unconstitutional” and vowed to fight it.

Legal challenges to the ban look set to loom large during confirmation hearings for Trump’s Supreme Court nominee, whose name he will unveil on Tuesday night.

Possibly the most dramatic gesture of protest to date came from the country’s top law enforcement official, Yates, who instructed Department of Justice attorneys Monday not to defend Trump’s immigration ban in court, expressing doubts about its legality and morality.

Trump wasted no time in crushing the rebellion.

Yates - an Obama appointee held over pending confirmation of Trump’s own nominee Jeff Sessions - was sacked within hours as the White House said she had “betrayed” the administration.

She was replaced as acting attorney general by federal prosecutor Dana Boente, who vowed to defend Trump’s directive.

Trump did get a vote of support Tuesday from House of Representatives speaker Paul Ryan, who defended the restrictions as a legitimate way to keep out potential terrorists.

“There is nothing wrong with taking a pause and making sure we had the proper vetting standards in place so that we do not have a problem like France had with Paris,” Ryan said, alluding to November 2015 suicide bombings and shootings that left 130 people dead in the French capital.

Around 48 percent of Americans support a freeze on immigration from “terror prone” regions, even if it means turning refugees away, according to a Quinnipiac poll released Monday.

But challenges to the measure have been mounting on all sides.

At the State Department, diplomats are preparing to use a “dissent channel” to protest the order, reportedly arguing that it will aid jihadist propaganda while offending vital Muslim allies in the fight against terror.

Word of these rumblings drew a scathing riposte from White House spokesman Sean Spicer, who said of the diplomats, “I think they should either get with the program or they can go.”

Senior national security officials from the Barack Obama and George W. Bush administrations warned in a letter to top Trump cabinet members that the order will do long-term damage to US national security, calling it a tragically “unnecessary” move that will fuel violent extremist propaganda.

And according to industry sources, a broad coalition of US technology firms - - including Google parent Alphabet, Netflix, Airbnb and Twitter - is planning a joint legal strategy challenging Trump’s order, which is expected to have a large impact on a sector that employs thousands of immigrants.

“The litany of ethics revelations regarding Tom Price are strong evidence that he cannot be allowed to have control of Medicare,” Wyden said.

He was referring to contentious accusations by Democrats that Price invested in a medical company that would have benefited from legislation that Price, a congressman from Georgia, co-sponsored.

“Mr. Mnuchin continued to fail to come clean on shady foreclosure practices that hurt Americans,” Wyden added.

Mnuchin, a Wall Street banker and Hollywood financier, was accused during his confirmation hearing of failing to disclose offshore holdings, and grilled over the home mortgage foreclosure practices of a bank he owned.

Senate Finance Committee chairman Orrin Hatch was visibly furious as he sat in a hearing with no Democrats.

“It’s a sad time when this bipartisan committee has become a prop in a partisan sideshow,” he fumed.

“I think they ought to stop posturing and acting like idiots.”

Senate rules require at least one lawmaker from the opposition party to be present for votes to be held.

Democrats told Hatch they wanted more time to demand new information from the nominees.

“I do not want to hear from any of them about ‘doing our jobs,’” Hatch said. “We’re here. They are not.”

Trump has repeatedly assailed Democrats for slow-walking nominations for political reasons.

“When will the Democrats give us our attorney general and rest of Cabinet! They should be ashamed of themselves!” Trump tweeted early Tuesday.

The Senate was holding a flurry of votes Tuesday, including a confirmation vote on the Senate floor for Elaine Chao as secretary of transportation.

Attorney General nominee Jeff Sessions was to get his vote in the Senate Judiciary Committee, after Democrats on the panel delayed the vote by a week.

Also receiving votes before relevant Senate panels are nominees for energy secretary, Rick Perry; interior secretary, Ryan Zinke; and education secretary, Betsy DeVos.