WASHINGTON ― Former Acting Attorney General Sally Yates stood by her decision to instruct Justice Department lawyers not to defend President Donald Trump’s first executive order on immigration, a move that swiftly led to her firing.

Yates revealed that the Trump administration never advised her about Trump’s executive order until it was issued on Jan. 27. She said neither DOJ leaders nor subject matter experts were consulted about the executive order.

“We weren’t even told about it,” Yates said. “I learned about this from media reports.”

Yates was fired 10 days into the Trump administration for stating the Justice Department would not defend Trump’s first executive order, which restricted travel and immigration from certain Muslim-majority countries. Yates said she analyzed the executive order in the context of Trump’s comments during the campaign on a Muslim ban, and concluded that the executive order was unlawful even if the text had been cleared by DOJ’s Office of Legal Counsel.

Yates also revealed Monday that OLC had specifically been advised not to tell her about the forthcoming executive order. (While Yates was still acting attorney general, DOJ said the OLC decision had been made “without the involvement of Department of Justice leadership.”)

Sen. Ted Cruz (R-Texas) had asked Yates whether she was aware of a situation where the attorney general overruled a decision of the Office of Legal Counsel days after it issued an order.

“I’m not, but I’m also not aware of a situation where the Office of Legal Counsel was advised not to tell the attorney general about it until after it was over,” Yates said in response.

OLC, Yates said, “has a narrow function” in the case of an executive order and did not take into account statements that might reveal the motivation for the executive order. A deeper analysis was required in this case because it dealt with a “fundamental issue of religious freedom,” Yates said.

“All arguments have to be based on truth, because we’re the Department of Justice. We’re not just a law firm, we’re the Department of Justice,” Yates testified on Monday. “In this instance, in looking at what the intent was of the executive order, which was derived from an analysis of facts outside the face of the order, that is part of what led to our conclusion that it was not lawful.”

Federal judges have subsequently cited Trump’s rhetoric about Muslims in court decisions, with one judge saying his words provide “significant and unrebutted evidence of religious animus.”

JIM WATSON via Getty Images Former acting Attorney General Sally Yates testifies on Monday before the U.S. Senate Judiciary Committee on Capitol Hill in Washington.

Sen. John Cornyn (R-Texas) had questioned Yates about her decision during an unrelated hearing on Monday, saying he voted for her because of her “distinguished” career as a federal prosecutor but found it “enormously disappointing” that she “vetoed” the Office of Legal Counsel.

But Yates said she wanted to make clear she didn’t disagree with the executive order just “purely as a policy matter” and that her analysis went much further. She recounted being asked during her confirmation as deputy attorney general what she would do if the president asked her to do something unlawful or unconstitutional.

“I looked at this, I made a determination that I believed that it was unlawful. I also thought it was inconsistent with the principles of the Department of Justice. And I said no,” Yates said. “That’s what I promised you I would do, and that’s what I did.”