Former Acting Attorney General Sally Yates, who was fired on Monday for refusing to defend President Trump’s immigration ban, was questioned by Sen. Jeff Sessions in what now appears to be a remarkable moment during her 2015 confirmation hearing.

Sessions, Trump’s current nominee for attorney general, had warned Yates during his grilling that she might face a crucial decision when confronting the president.

“Do you think the attorney general has the responsibility to say ‘no’ to the president if he asks for something that’s improper?” Sessions asked Yates in the hearing.

“If the views that the president wants to execute are unlawful, should the attorney general or deputy attorney general say ‘no’?”

Yates replied that she was bound by the Constitution to do what is best for the country.

“I believe that the attorney general or deputy attorney general has an obligation to follow the law and the Constitution and give their independent legal advice to the president,” Yates replied.

Yates was faced with that very decision on Monday.

She was tasked to mount a legal defense for Trump’s executive order which bars immigrants from seven Muslim-dominated countries. She refused.

In a statement, Yates said she did not believe the order was lawful, setting off a firestorm of accusations of political bias.

Trump quickly fired Yates and installed Dana Boente, the US attorney for the Eastern District of Virginia, to run the Justice Department. Boente quickly said he would uphold Trump’s travel ban in court.

Sessions’ confirmation is set for a vote in the Senate Judiciary Committee on Tuesday before it moves to a floor vote. In the meantime, Boente will continue in the acting AG role.