WASHINGTON — The F.B.I. investigated Attorney General Jeff Sessions for possible perjury last year over congressional testimony in which he said he had no contacts with Russians, according to three people familiar with the case.

In fact, Mr. Sessions later acknowledged, he had personally met the Russian ambassador to the United States during the campaign and was aware that George Papadopoulos, a campaign adviser, had developed Russian ties, too. F.B.I. agents were aware of both inaccuracies in real time. And last March, when Congress asked the F.B.I. to investigate the attorney general, agents began doing so, two of the people said.

Andrew G. McCabe, the F.B.I.’s deputy director at the time, authorized the investigation, the two people said. Mr. McCabe himself was recently fired for showing “lack of candor” in an internal investigation. Mr. Sessions rejected Mr. McCabe’s appeal and fired him hours before his retirement was to take effect, jeopardizing his pension.

The investigation into Mr. Sessions began before Robert S. Mueller III was appointed special counsel to investigate Russia-related matters. Mr. Sessions’s lawyer, Chuck Cooper, said no investigation is being conducted now.