Mr. Trump’s aides initially said they had no inkling of the accusations against Mr. Porter until press reports that first appeared in The Daily Mail last week, and acted swiftly to terminate him when they discovered them. In fact, the White House spent the first hours after learning of the accusations — including the publication of photographs of one of his ex-wives with a black eye she said he gave her — defending Mr. Porter against the allegations and insisting that he was not being dismissed.
Since then, multiple people familiar with the situation have said that top officials — including John F. Kelly, the chief of staff; Joe Hagin, the deputy chief of staff for operations; and Donald F. McGahn II, the White House counsel — learned in November that there were problems with Mr. Porter’s background investigation.
Even after Mr. Kelly changed his stance, calling the allegations vile and orchestrating Mr. Porter’s swift departure, the president has stuck up for him publicly, telling reporters that the situation had been “tough” and “sad” for Mr. Porter. The president insisted that Mr. Porter had denied the accusations, and wished him a successful career.
Mr. Porter’s two former wives, who accuse him of physically and emotionally abusing them during their marriages, both say they informed F.B.I. investigators conducting his background check of the incidents in January of last year.
Mr. Wray’s testimony suggested that the White House security office, which handles security clearances and is overseen by Mr. Hagin, had received a preliminary report on Mr. Porter from the F.B.I. months earlier than previously known.
Speaking before the Senate Intelligence Committee, Mr. Wray did not disclose the contents of the bureau’s inquiry. But he said that after the partial report in March, the F.B.I. gave the White House “a completed background investigation” on Mr. Porter in late July. He said the bureau received a request for a “follow-up inquiry” — the kind of directive that typically would have come from a senior official in the West Wing — and provided more information about Mr. Porter’s background to the White House in November.
He also said that Mr. Porter’s background check investigation was “administratively closed” in January, weeks before the allegations against Mr. Porter were publicly known.
Mr. Wray said he was “quite confident” that established protocol was followed. Sarah Huckabee Sanders, the White House press secretary who on Monday deflected a number of questions about how the White House handled Mr. Porter’s case, also suggested that it was the intelligence agencies that conduct background checks who should consider their handling of the matter.
“It’s up to those same law enforcement and intelligence agencies to determine if changes need to be made to their process,” Ms. Sanders said.
Officials have said the security office at the White House was first contacted by the F.B.I. in June, and again in November. But White House officials also have insisted that the investigation into Mr. Porter’s background was never completed.
“His background investigation was ongoing,” Raj Shah, the deputy White House press secretary, told reporters last week. “He was operating on an interim security clearance. His clearance was never denied, and he resigned.”
Mr. Wray said on Tuesday that while the background investigation was closed in January, the bureau “received some additional information” after the file was closed and passed that on to the White House as well.