Senator Jeff Sessions, US president Donald Trump’s nominee for attorney general, has a solid grasp of the law. And that may put him in conflict with the very administration backing his appointment.

During Sally Yates’ confirmation hearing for US deputy attorney general in 2015, he grilled her over whether she would refuse to back the president if what he wanted was illegal.

“You have to watch out because they will be asking you to do things you just need to say ‘no’ about,” warned Sessions.

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

Until yesterday, Sally Yates was the United States’ acting attorney general, a post she was filling while Sessions gets confirmed. Then on Jan. 30, she did just what she had promised Sessions, two years ago: She exercised her own expert judgement, sending out a memo to staff saying she did not intend to defend Trump’s executive order barring refugees and citizens from seven Muslim-majority countries from entering the US, because she was unsure of its legality. She was fired in a matter of hours.

The Sessions-Yates exchange is uncomfortably poignant. Yates sealed her fate back when she vowed to do what attorneys general are supposed to do. The testimony also puts Sessions on the record as upholding the same key principles that got Yates fired. (He also answered like Yates when asked the same question during his confirmation hearing for attorney general on Jan. 10.)

To be sure, given his political views, Sessions is more likely to find lawfulness in Trump’s policies—a troubling, yet standard position for the head of the Department of Justice, who is after all, a political appointee. Still, the video forces the question: Could Sessions be fired for upholding the same professional principles as Yates did?