The White House said late Monday that the country’s new acting attorney general, federal prosecutor Dana J. Boente, pledged to “defend and enforce” the laws of the country shortly after President Trump fired the former seat holder who refused to enforce his order on immigration.

Trump fired Sally Yates, the acting attorney general and an Obama appointee, in dramatic fashion after she refused to defend in court his refugee and immigration ban. The Wall Street Journal reported that Yates learned of her firing Monday evening in a hand-delivered note from the White House’s Office of Personnel.

The firing came hours after Yates directed Justice Department attorneys not to defend the executive order, saying she was not convinced it was lawful or consistent with the agency's "obligation to always seek justice and stand for what is right."

In a statement, Trump said Yates had "betrayed the Department of Justice by refusing to enforce a legal order designed to protect the citizens of the United States."

He named Boente as Yates' replacement. Boente served in the Eastern District of Virginia and will remain in the seat while Congress considers the confirmation of Sen. Jeff Sessions, R-Ala., which could happen next week.

Statement on the Appointment of Dana Boente as Acting Attorney General: https://t.co/fkAWOmnrsP — President Trump (@POTUS) January 31, 2017

“Ms. Yates is an Obama administration appointee who is weak on borders and very weak on illegal immigration,” Sean Spicer, the White House press secretary, said in a statement. The New York Times reported that Boente was sworn in at 9 p.m. ET, but gave few details about who performed the ceremony.

“I am honored to serve President Trump in this role until Sen. Sessions is confirmed. I will defend and enforce the laws of our country to ensure that our people and our nation are protected,’’ Boente said in a statement released by the White House.

Still, Trump’s order has faced condemnation from executives at top companies, including Goldman Sachs and Coca-Cola. A spokesman for former President Obama said Obama is “heartened” by the protests.

Trump's policy decision temporarily halted the entire U.S. refugee program and banned all entries from seven Muslim-majority nations for 90 days.

Trump's order pauses America's entire refugee program for four months and indefinitely bans all those from war-ravaged Syria. 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.

At least three top national security officials -- Defense 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, officials told the Associated Press.

Mattis, who stood next to Trump during Friday's signing ceremony, is said to be particularly incensed. A senior U.S. official said Mattis, along with Joint Chiefs Chairman 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.

Trump has also said he believes the voters who carried him to victory support the plan as a necessary step to safeguard the nation. And he's dismissed objectors as attention-seeking rabble-rousers and grandstanding politicians.

After a chaotic weekend during which some U.S. legal permanent residents were detained at airports, some agencies were moving swiftly to try to clean up after the White House.

“You now have a president who really takes seriously the tremendous threat of international terrorism and is prepared to take steps that are very tough-minded and that are going to inconvenience some people,” former Speaker Newt Gingrich told “Hannity.”

The Associated Press contributed to this report.