President Donald Trump’s administration spent at least a week before former FBI Director James Comey’s abrupt termination on Tuesday looking for a reason to fire him, according to reports by the New York Times and CNN.

The New York Times reported, citing unnamed administration officials, that senior officials at the White House and Department of Justice were at work “building a case” against Comey for at least the last week. Those officials also told the New York Times that Attorney General Jeff Sessions was ordered to find a reason to terminate Comey.

CNN’s Jeff Zeleny said it was “a very closely kept secret” at the White House.

“I am told only a handful of top advisers knew this was coming,” he said. “But I am told just moments ago that the President himself has been considering this, been thinking about this for at least a week.”

Zeleny said Trump “did not necessarily have the rationale” to fire Comey when he first began discussing the possibility “but then asked the attorney general and the deputy attorney general to look for that rationale and that explanation.”