Donald Trump has sacked the US Attorney General for opposing his immigration ban.

US President Donald Trump has sacked the nation’s acting Attorney General after she pledged to defy his controversial immigration ban.

In a memo released Monday, Sally Q. Yates had said she was not convinced that Trump’s executive order to suspend the intake of refugees and to halt immigration from seven Muslim-majority nations was legal.

“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,” said Yates, who was appointed as Deputy Attorney General under Obama.

Sally Yates has been "relieved" of her duties. (Image: Getty.)

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

"Consequently, for as long as I am the Acting Attorney General, the Department of Justice will not present arguments in defense of the Executive Order, unless and until I become convinced that it is appropriate to do so."

Hours later, the White House hit back, announcing that the veteran attorney had been relieved of her duties.

Donald Trump was not impressed. (Image: Getty)

"The Acting Attorney-General, Sally Yates has betrayed the Department of Justice by refusing to enforce a legal order to protect citizens of the United States," the statement read.

"Ms. Yates is an Obama Administration appointee who is weak on borders and very weak on illegal immigration."

Yates has been temporarily replaced by Dana Boente, who was nominated by President Barack Obama as the U.S. Attorney for the Eastern District of Virginia in 2015.

The controversial executive order, signed by the President on January 27 in an attempt to prevent foreign terrorists from entering the US, has sparked protests at airports across the United States.

The directive includes halting all refugee admissions for 120 days, an indefinite suspension of the Syrian refugee program and also a ban on citizens from Iran, Iraq, Libya, Somalia, Sudan, Syria and Yemen entering the US for 90 days.

Australians are exempt from the ban, including those who hold dual citizenship with any of the seven nations, according to an announcement by Prime Minister Malcolm Turnbull Tuesday afternoon.

00:00 / ???