U.S. 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, U.S. Attorney for the Eastern District of Virginia, would replace Yates, an appointee of former Democratic President Barack Obama, as acting U.S. 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.

Story continues below advertisement

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 U.S. 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.