Mr Cruz tried to challenge the former acting Attorney General's decision not to enforce Mr Trump's ban - the original version of which would have restricted travel from seven Muslim-majority countries - only to find that she had come prepared.
Ms Yates determined the executive order violated the “fundamental” right to freedom of religion and so stuck by the decision, which would eventually lead to her dismissal from her job.
Republican Senator John Cornyn repeatedly chided Ms Yates for overruling the Office of Legal Counsel (OOLC) within the Department of Justice that had determined the travel ban was lawful.
He said the decision to make the determination of whether Mr Trump’s executive order was unlawful should have been left up to the courts. Mr Cornyn did not mention the district courts that have blocked the executive order.
“The [OOLC] has a narrow function. They look at the face of the executive order...purely on its face,” she explained.
That office does not take into account “extemporaneous” comments on the intent of the executive order, Ms Yates said.
Ms Yates reminded Mr Cornyn that during her confirmation hearing under the Obama administration that she vowed, under oath, to tell the President if she was asked to do something she determined to be unlawful or “inconsistent with the principles of the Department of Justice.”
Ted Cruz, the Republican Senator from Texas, read out the federal regulation relevant to the President’s authority regarding barring “aliens” from entering the US if it is “not in the best interest” of the country.
Ms Yates then read another portion of the same regulation, passed after the portion to which Mr Cruz referred: “no person shall receive preference or be discriminated in issuance of a visa against because of race, nationality, or place of birth.”
“That’s been part of the discussions with the courts...is whether this more specific statute trumps the first one that you just described,” Ms Yates explained.
Democratic Senator Amy Klobuchar noted that the same day the “Muslim ban” executive order was signed was also the same day Ms Yates had a meeting with the White House to warn them about former National Security Advisor Mike Flynn’s ties to Russian officials.
Ms Yates said the White House not only did not consult with her office about the order, but did not tell her it was coming either, adding that she found out about it from the media.
"I did my job," Ms Yates said.
Join our new commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies