Washington - In an extraordinary public showdown, President Donald Trump fired the acting attorney general of the United States after she publicly questioned the constitutionality of his refugee and immigration ban and refused to defend it in court.The clash on Monday night between Trump and Sally Yates, a career prosecutor and Democratic appointee, laid bare the growing discord and dissent surrounding an executive order that halted the entire US refugee programme and banned all entries from seven Muslim-majority nations for 90 days. The firing, in a written statement released just hours after Yates went public with her concerns, also served as a warning to other administration officials that Trump is prepared to terminate those who refuse to carry out his orders.Yates' refusal to defend the executive order was largely symbolic given that Senator Jeff Sessions, Trump's pick for attorney general, will almost certainly defend the policy once he's sworn in. He's expected to be confirmed on Tuesday by the Senate Judiciary Committee and could be approved within days by the full Senate.Yet the firing reflected the mounting conflict over the executive order, as administration officials have moved to distance themselves from the policy and even some of Trump's top advisers have made clear that they were not consulted on its implementation.As protests erupted at airports across the globe, and as legal challenges piled up in courthouses, Yates directed agency attorneys not to defend the executive order. She said in a memo Monday she was not convinced it was lawful or consistent with the agency's obligation "to stand for what is right."Trump's press secretary, Sean Spicer, soon followed with a statement accusing Yates of having "betrayed the Department of Justice by refusing to enforce a legal order designed to protect the citizens of the United States." Trump named longtime federal prosecutor Dana Boente, the US attorney for the Eastern District of Virginia, as Yates' replacement. Boente was sworn in privately late Monday, the White House said, and rescinded Yates's directive.Also late Monday, the acting head of Immigration and Customs Enforcement was removed. The administration didn't offer any explanation for the move, only said via Twitter that Daniel Ragsdale is returning to his previous position as deputy director. ICE executive associate director Thomas Homan was elevated to the role of acting chief.Homeland Security Secretary John Kelly said in a statement that Homan had led efforts "to identify, arrest, detain, and remove illegal aliens." The statement didn't mention Ragsdale.Blowback underscored tenuous relationship The chain of events bore echoes of the Nixon-era "Saturday Night Massacre," when the attorney general and deputy attorney general resigned rather than follow an order to fire a special prosecutor investigating the Watergate scandal. The prosecutor, Archibald Cox, was fired by the solicitor general.Yates, a holdover from the Obama administration who was the top federal prosecutor in Atlanta and later became Loretta Lynch's deputy, was not alone in her misgivings about the policy and its roll-out.At least three top national security officials - Defence Secretary Jim Mattis, Homeland Security Secretary John Kelly and Rex Tillerson, who is awaiting confirmation to lead the State Department - have told associates they were not aware of details of the directive until around the time Trump signed it. Leading intelligence officials were also left largely in the dark, according to US officials.Tennessee Senator Bob Corker, the top Republican on the Senate Foreign Relations Committee, said that despite White House assurances that congressional leaders were consulted, he learned about the order from the media.A large group of career diplomats circulated several drafts of a memo arguing that the order Trump signed last week will not make the US safe, saying it runs counter to American values and will fuel anti-American sentiment around the world.Spicer challenged those opposed to the measure to resign. "They should either get with the programme or they can go," he said.Trump's order pauses America's entire refugee program for four months, indefinitely bans all those from war-ravaged Syria and temporarily freezes immigration from Iraq, Syria, Iran, Sudan, Libya, Somalia and Yemen. Federal judges in New York and several other states issued orders that temporarily block the government from deporting people with valid visas who arrived after Trump's travel ban took effect and found themselves in limbo.Yates on Monday said that she had reviewed the policy and concluded that it was at odds with the Justice Department's mission. She said that though other lawyers in the department had reviewed the order, their review had not addressed whether it was "wise or just.""I am responsible for ensuring that the positions we take in court remain consistent with this institution's solemn obligation to always seek justice and stand for what is right," Yates wrote in a letter.Allow legal residents Trump said the order had been "approved" by Justice Department lawyers. However, the department has said the Office of Legal Counsel review was limited to whether the order was properly drafted, but did not address broader policy questions.The blowback underscored Trump's tenuous relationship with his own national security advisers, many of whom he met for the first time during the transition.Mattis, who stood next to Trump during Friday's signing ceremony, is said to be particularly incensed. A senior US official said Mattis, along with Joint Chiefs Chair Joseph Dunford, was aware of the general concept of Trump's order but not the details. Tillerson has told the president's political advisers that he was baffled over not being consulted on the substance of the order.US officials and others with knowledge of the Cabinet's thinking insisted on anonymity in order to disclose the officials' private views.Despite his public defence of the policy, the president has privately acknowledged flaws in the roll-out, according to a person with knowledge of his thinking. But he's also blamed the media - his frequent target - for what he believes are reports exaggerating the dissent and the number of people actually affected.After a chaotic weekend during which some US legal permanent residents were detained at airports, some agencies were moving swiftly to try to clean up after the White House.Homeland Security, the agency tasked with implementing much of the refugee ban, clarified that customs and border agents should allow legal residents to enter the country. The Pentagon was trying to exempt Iraqis who worked alongside the US and coalition forces from the 90-day ban on entry from the predominantly Muslim countries.