WASHINGTON — President Trump accused the F.B.I. on Friday, without evidence, of sending a spy to secretly infiltrate his 2016 campaign “for political purposes” even before the bureau had any inkling of the “phony Russia hoax.”

In fact, F.B.I. agents sent an informant to talk to two campaign advisers only after they received evidence that the pair had suspicious contacts linked to Russia during the campaign. The informant, an American academic who teaches in Britain, made contact late that summer with one campaign adviser, George Papadopoulos, according to people familiar with the matter. He also met repeatedly in the ensuing months with the other aide, Carter Page, who was also under F.B.I. scrutiny for his ties to Russia.

The role of the informant is at the heart of the newest battle between top law enforcement officials and Mr. Trump’s congressional allies over the F.B.I.’s most politically charged investigations in decades. The lawmakers, who say they are concerned that federal investigators are abusing their authority, have demanded documents from the Justice Department about the informant.

Law enforcement officials have refused, saying that handing over the documents would imperil both the source’s anonymity and safety. The New York Times has learned the source’s identity but typically does not name informants to preserve their safety.