WASHINGTON: US President Donald Trump fired the federal government's top lawyer Sally Yates on Monday after she took the extraordinarily rare step of defying the White House and saying the Justice Department would not defend his new travel restrictions targeting seven Muslim-majority nations.

The White House said on Twitter that Dana Boente, US Attorney for the Eastern District of Virginia, would replace Yates, an appointee of former Democratic President Barack Obama, as acting US attorney general.

“The acting Attorney General, Sally Yates, has betrayed the Department of Justice by refusing to enforce a legal order designed to protect the citizens of the United States,” the White House said in its statement.

"I am honored to serve President Trump in this role until Senator Sessions is confirmed. I will defend and enforce the laws of our country to ensure that our people and our nation are protected," said Dana Boente, Acting Attorney General.

Yates on Monday told Justice Department lawyers in a letter that they would not defend in court Trump's directive that put a 120-day hold on allowing refugees into the country, an indefinite ban on refugees from Syria and a 90-day bar on citizens from Iran, Iraq, Libya, Somalia, Sudan, Syria and Yemen.

Yates said she did not believe defending the order would be "consistent with this institution's solemn obligation to always seek justice and stand for what is right."

Trump has argued tougher vetting of immigrants is needed to protect America from terror attacks but critics complain that his order unfairly singles out Muslims and defiles America's historic reputation as a welcoming place for immigrants.

Yates was days away from being replaced by Trump's pick for the top spot at the Justice Department, Republican Senator Jeff Sessions, who is awaiting Senate confirmation.

The White House dismissed her comments as rhetoric and said Trump acted within his presidential powers.

"I think that's a further demonstration of how politicized our legal system has become," said Stephen Miller, a policy adviser to Trump, in an interview on MSNBC.

There have been only a handful of instances in US history of top Justice Department officials publicly breaking with the White House. The most famous example was in 1973, when then-Attorney General Elliot Richardson resigned rather than obey President Richard Nixon’s order to fire a special prosecutor investigating the Watergate scandal.