Still, pressed on whether senior officials — including John F. Kelly, the chief of staff; Donald F. McGahn II, the White House counsel; and Mr. Hagin — could have been unaware as far back as last summer that such a significant issue had been raised about one of the president’s closest aides, she conceded she could not be certain.

“Not that I’m aware of,” Ms. Sanders said. “I can’t say with 100 percent certainty.”

According to the two people briefed on the matter, the White House security office reviewed the allegations about Mr. Porter in July and saw that the F.B.I. had interviewed Mr. Porter’s two former wives but not Mr. Porter himself. The office asked the F.B.I. to go back and do so, said the two people, who spoke on the condition of anonymity because they were not authorized to discuss the case.

In November, the F.B.I. provided another report to the security office, the two people said, adding that at that point, a final review began to determine whether to grant Mr. Porter a security clearance. As part of that review, three officials in the personnel office, including its head, were supposed to come to their own conclusions about whether to grant the clearance, the people said.

By the time The Mail published its article last week, only one of those officials had made a determination, the two people said, although it is not clear what the official had concluded.

In late November last year, a distraught girlfriend of Mr. Porter’s contacted Mr. McGahn and told him Mr. Porter had been unfaithful to her by dating Hope Hicks, the White House communications director, and had anger problems, according to several people familiar with the discussion. Mr. McGahn, who knew Mr. Porter’s girlfriend, at that point suggested to Mr. Porter he should consider leaving the White House, the people said. But Mr. McGahn did not follow up on the matter.

One former White House official, Anthony Scaramucci, who lasted 10 days last year as White House communications director before being removed by Mr. Kelly, weighed in on Tuesday on Mr. Wray’s testimony. Mr. Scaramucci posted on Twitter that Mr. Kelly “almost certainly knew about credible allegations of domestic abuse against Rob Porter at least 6 months ago - then recently forced others to lie about that timeline.”