Mr. Kelly told staff members that he had learned the details of Mr. Porter’s situation only “40 minutes before he threw him out” two days earlier. In a memo sent that night, Mr. Kelly wrote: “While we are all processing the shocking and troubling allegations made against a former White House staffer, I want you to know that we all take matters of domestic violence very seriously. Domestic violence is abhorrent and has no place in our society.”

Feb. 9

Mr. Trump acknowledged the accusations facing Mr. Porter, saying that it was a “tough time” for his former aide. The president added, “He also, as you probably know, says he is innocent, and I think you have to remember that.” Mr. Kelly also told White House officials that he was willing to step down over his handling of the allegations.

That evening, the White House announced that Derek Lyons, another lawyer educated at Harvard Law School and Mr. Porter’s No. 2, had been elevated to acting staff secretary.

Feb. 11

A day after Mr. Trump complained that a “mere allegation” could ruin someone without due process, White House aides fanned out to talk shows to say that Mr. Porter had lied to them and deserved to be pushed out.

Feb. 13

While testifying in front of the Senate Intelligence Committee, Mr. Wray, the F.B.I. director, contradicted the White House timeline and confirmed for the first time that the bureau had given the White House a partial report on problems in Mr. Porter’s background in March. He also said the bureau had closed its investigation in January, though the White House had insisted that it was still continuing well into February.

Maggie Haberman contributed reporting from New York.