WATCH: Sally Yates Just Kept Her Word When She Said 'No' to Trump's Travel Ban

The attorney general has the obligation to follow the law and disagree with the president, Sally Yates tells no other than Jeff Sessions in 2015.

Deputy Attorney General Sally Yates speaks during a press conference in Washington on June 28, 2016.

Acting U.S. Attorney General Sally Yates, fired on Monday night over her opposition to the executive order banning the citizens of seven Muslim-majority countries from entering the country, seems to have just stuck by her promise.

In a 2015 confirmation hearing for the role of deputy attorney general, Yates was asked by Sen. Jeff Sessions – President Donald Trump's designated attorney general – about saying "No" to the president in the case of executing unlawful requests.

"Senator, 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."

Well, maybe the White House should have seen it coming.

Watch here: