President Trump fired acting Attorney General Sally Yates on Monday just hours after she refused to have the Justice Department defend his controversial executive order blocking people from seven Muslim-majority countries from entering the United States.

The White House acted swiftly, issuing a statement declaring that Yates, who was appointed by former President Barack Obama Barack Hussein ObamaObama calls on Senate not to fill Ginsburg's vacancy until after election Senate Republicans face tough decision on replacing Ginsburg Cruz: Trump should nominate a Supreme Court justice next week MORE, had “betrayed” the U.S. government.

Trump selected Dana Boente, U.S. attorney for the Eastern District of Virginia, to replace Yates until his attorney general nominee, Sen. Jeff Sessions Jefferson (Jeff) Beauregard SessionsTrump's policies on refugees are as simple as ABCs Ocasio-Cortez, Velázquez call for convention to decide Puerto Rico status White House officials voted by show of hands on 2018 family separations: report MORE (R-Ala.), is confirmed by the Senate. That vote could occur this week.

ADVERTISEMENT

"Ms. Yates is an Obama administration appointee who is weak on borders and very weak on illegal immigration,” the White House said in a statement. “It is time to get serious about protecting our country.”

The decision to ax Yates capped off a turbulent day in which the Trump administration was forced to confront mounting opposition to its order, which bars all refugees for four months and bans citizens of Iran, Iraq, Syria, Somalia, Libya, Sudan and Yemen from entering the U.S. for at least 90 days. The order also suspends indefinitely Syrian refugee resettlement.

Obama broke his silence just 10 days after leaving office, backing nationwide protests against the order. Congressional Democrats staged a demonstration on the steps of the Supreme Court to denounce it, and more than two dozen Republicans have refused to endorse the new policy.

Throughout Monday, the White House defended the order, castigating media coverage as overheated and criticizing Democrats. Trump accused Senate Minority Leader Charles Schumer Chuck SchumerPelosi orders Capitol flags at half-staff to honor Ginsburg Ginsburg in statement before her death said she wished not to be replaced until next president is sworn in Democrats call for NRA Foundation to be prohibited from receiving donations from federal employees MORE (D-N.Y.) of shedding "fake tears" after the Democrat choked up while criticizing the order on Sunday.

The White House has saved its sharpest rebukes for career officials within the administration who have been critical of the order.

“I think that they should either get with the program or they can go,” White House press secretary Sean Spicer said when asked about State Department employees drafting an internal cable registering their disapproval of the order.

ADVERTISEMENT

Yates, a veteran of the department who was appointed by Obama, sent a letter Monday to Justice Department officials laying out her decision not to defend it.

"My responsibility is to ensure that the position of the Department of Justice is not only legally defensible, but is informed by our best view of what the law is after consideration of all the facts," she wrote.

"At present, I am not convinced that the defense of the executive order is consistent with these responsibilities nor am I convinced that the executive order is lawful."

About an hour after the news of Yates's decision broke, Trump tweeted that Democrats were obstructing him and referred to an "Obama A.G.”

Shortly after, the White House sent a statement announcing Boente's elevation. He was sworn in at 9 p.m. Monday, according to a White House spokesman.

Boente is a 31-year veteran of the Justice Department. He was appointed by Obama as U.S. attorney in 2015.

Asked if he would defend the order in court, Boente told The Washington Post, “Yes, I will.”

“Our career department employees were defending the order in court, and that’s what I expect they will do tomorrow, appropriately and properly.”

The new Acting Attorney General, to me just now, on whether he'll enforce the immigration order. pic.twitter.com/Mcll4z6ish — Matt Zapotosky (@mattzap) January 31, 2017

The order is already facing a number of legal challenges.

A federal judge in New York on Saturday granted a request from the American Civil Liberties Union, filed on behalf of two Iraqi men who were detained at John F. Kennedy Airport, to block the deportation of people stranded in the U.S.

ADVERTISEMENT

The Council on American-Islamic Relations also filed a broader lawsuit against the order Monday in an Alexandria, Va., federal court.

Yates's firing also raises the stakes for the upcoming confirmation vote on Sessions, who is expected to uphold the ban.

The acting attorney general will be replaced within days, assuming Sessions is confirmed. The Senate Judiciary Committee is expected to vote Tuesday morning on whether to recommend his confirmation to the full Senate.

Schumer praised Yates while criticizing the White House.

“The firing of Sally Yates underscores how important it is to have an Attorney General who will stand up to the White House when they are violating the law," he said. "Many people have doubts about whether Jeff Sessions can be that person, and the full Senate and the American people should at the very least know exactly how independent he plans to be before voting on him.

“The Attorney General should be loyal and pledge fidelity to the law, not the White House. The fact that this administration doesn’t understand that is chilling.”

ADVERTISEMENT

Yates's clash with the White House is reminiscent of the time Attorney General Elliot Richardson and Deputy Attorney General William Ruckelshaus bucked President Richard Nixon’s order to fire special prosecutor Archibald Cox during the Watergate scandal.

Nixon instead fired Cox himself, and accepted Ruckelshaus and Richardson's resignations on Oct. 20, 1973, in what became known as the “Saturday Night Massacre.”

Yates's situation differs in that she stayed on board during the transition from Obama to Trump at the president's request.

Updated 10:18 p.m.