Sally Yates, the country's acting attorney general, until last night, decided that she couldn't instruct Justice Department lawyers to enforce President Donald Trump's travel ban because of its 'intent.'

According to reporting from the New York Times, Yates believed Trump's executive order was designed to single out people based on their Muslim religion.

And so, instead of simply resigning, Yates told government lawyers not to defend the ban in court, a move that got her fired by the new president several hours later.

Scroll down for video ,

Sally Yates, who was acting attorney general until she was fired by President Donald Trump last night, was concerned about the 'intent' of the president's travel ban

Sally Yates decided to instruct Justice Department lawyers not to defend the ban, which targeted seven Muslim-majority countries, a move that got her fired

As the Times points out, Yates, during her own confirmation hearing in front of the U.S. Senate, was asked by Sen. Jeff Sessions of Alabama what she would do if she thought the 'views the president wants to execute are unlawful.'

'Should the attorney general or the deputy attorney general say "No?"' Sessions wanted to know.

Sessions own nomination for attorney general is slowly moving through the Senate.

Yates replied at the 2015 hearing, 'I believe the attorney general or deputy attorney general has an obligation to follow the law and Constitution and give their independent legal advice to the president,' she said at the time.

On Monday, she acted on that premise.

It was Trump's own rhetoric, according to the Times, that made her wary of the lawfulness of the ban.

Directly after the San Bernardino terror attack, Trump campaigned on a Muslim ban.

The Republican candidate called for a 'total and complete shutdown of Muslims entering the United States until our country's representatives can figure out what the hell is going on.'

The executive order Trump signed on Friday is also a pause, 90 days for people coming from seven Muslim-majority countries and a 120 day break in refugees being allowed to come into the United States.

Additionally, Rudy Giuliani, one of Trump's top surrogates, said in an interview that Trump wanted a Muslim ban, but needed to figure out 'the right way to do it legally.'

Later, Trump himself said in an interview with the Christian Broadcasting Network that Christian refugees would be given a leg up in the visa process.

Like many in Washington, the order caught Yates by surprise on Friday night and kicked off three days of debate within the Justice Department.

Some in the agency believed the Justice Department should defend the president's order, as they normally would, while others believed they should not.

Yates thought about resigning, but she realized, then, the decision would be left up to whoever took her place, while Sessions nomination moved through the Senate.

She ended up writing a letter to the department's lawyers, which quickly made its way to the press.

'I am not convinced that the defense of the executive order is consistent with these responsibilities, nor am I convinced the executive order is lawful,' Yates said.

Shortly after that, the White House sent over a letter signed by John DeStefano, an assistant to President Trump.

'Dear Deputy Attorney General Yates,' the letter read. 'I am informing you that the president has removed you from the office of Deputy Attorney General of the United States.'

Yates packed up her office around midnight and left the department.