A secret document that officials say played a key role in then-FBI Director James B. Comey’s handling of the Hillary Clinton email investigation has long been viewed within the FBI as unreliable and possibly a fake, according to people familiar with its contents.

In the midst of the 2016 presidential primary season, the FBI received what was described as a Russian intelligence document claiming a tacit understanding between the Clinton campaign and the Justice Department over the inquiry into whether she intentionally revealed classified information through her use of a private email server.

The Russian document cited a supposed email describing how then-Attorney General Loretta E. Lynch had privately assured someone in the Clinton campaign that the email investigation would not push too deeply into the matter. If true, the revelation of such an understanding would have undermined the integrity of the FBI’s investigation.

Current and former officials have said that Comey relied on the document in making his July decision to announce on his own, without Justice Department involvement, that the investigation was over. That public announcement — in which he criticized Clinton and made extensive comments about the evidence — set in motion a chain of other FBI moves that Democrats now say helped Trump win the presidential election.

But according to the FBI’s own assessment, the document was bad intelligence — and according to people familiar with its contents, possibly even a fake sent to confuse the bureau. The Americans mentioned in the Russian document insist they do not know each other, do not speak to each other and never had any conversations remotely like the ones described in the document. Investigators have long doubted its veracity, and by August the FBI had concluded it was unreliable.

FBI Director James B. Comey makes a statement at FBI headquarters on July 5. (Cliff Owen/AP)

The document, obtained by the FBI, was a piece of purported analysis by Russian intelligence, the people said. It referred to an email supposedly written by the then-chair of the Democratic National Committee, Rep. Debbie Wasserman Schultz (D-Fla.), and sent to Leonard Benardo, an official with the Open Society Foundations, an organization founded by billionaire George Soros and dedicated to promoting democracy.

The Russian document did not contain a copy of the email, but it described some of the contents of the purported message.

[From Clinton emails to alleged Russian meddling in election: The events leading up to Comey’s firing]

In the supposed email, Wasserman Schultz claimed Lynch had been in private communication with a senior Clinton campaign staffer named Amanda Renteria during the campaign. The document indicated Lynch had told Renteria that she would not let the FBI investigation into Clinton go too far, according to people familiar with it.

Current and former officials have argued that the secret document gave Comey good reason to take the extraordinary step over the summer of announcing the findings of the Clinton investigation himself without Justice Department involvement.

Comey had little choice, these people have said, because he feared that if Lynch announced no charges against Clinton, and then the secret document leaked, the legitimacy of the entire case would be questioned.

From the moment the bureau received the document from a source in early March 2016, its veracity was the subject of an internal debate at the FBI. Several people familiar with the matter said the bureau’s doubts about the document hardened in August when officials became more certain that there was nothing to substantiate the claims in the Russian document. FBI officials knew the bureau never had the underlying email with the explosive allegation, if it ever existed.

Amanda Renteria in Washington in April 2014. (Jacquelyn Martin/AP)

Yet senior officials at the bureau continued to rely on the document before and after the election as part of their justification for how they handled the case.

Wasserman Schultz and Benardo said in separate interviews with The Washington Post that they do not know each other and have never communicated. Renteria, in an interview, and people familiar with Lynch’s account said the two also do not know each other and have never communicated. Lynch declined to comment for this article.

Moreover, Wasserman Schultz, Benardo and Renteria said they have never been interviewed by the FBI about the matter.

Comey’s defenders still insist that there is reason to believe the document is legitimate and that it rightly played a major role in the director’s thinking.

[FBI director says he feels ‘mildly nauseous’ about possibility he affected election, but has no regrets]

“It was a very powerful factor in the decision to go forward in July with the statement that there shouldn’t be a prosecution,” said a person familiar with the matter. “The point is that the bureau picked up hacked material that hadn’t been dumped by the bad guys [the Russians] involving Lynch. And that would have pulled the rug out of any authoritative announcement.”

Other people familiar with the document disagree sharply, saying such claims are disingenuous because the FBI has known for a long time that the Russian intelligence document is unreliable and based on multiple layers of hearsay.

“It didn’t mean anything to the investigation until after [senior FBI officials] had to defend themselves,” said one person familiar with the matter. “Then they decided it was important. But it’s junk, and they already knew that.”

An FBI spokesman declined to comment. Comey did not respond to requests for comment.

The people familiar with the Russian document spoke on the condition of anonymity because they were not authorized to discuss its contents. No one familiar with it asked The Post to withhold details about its origins to safeguard the source.

Several of them said they were concerned that revealing details now about the document could be perceived as an effort to justify Trump’s decision to fire Comey, but they argued that the document and Comey’s firing are distinct issues. Most of the people familiar with the document disagree strongly with the decision to fire the director, but they also criticized current and former officials who have privately cited the document as an important factor in the decisions made by Comey and other senior FBI officials. Comey told lawmakers he would discuss it with them only in a classified session.

Email not obtained

After the bureau first received the document, it attempted to use the source to obtain the referenced email but could not do so, these people said. The source that provided the document, they said, had previously supplied other information that the FBI was also unable to corroborate.

While it was conducting the Clinton email investigation, the FBI did not interview anyone mentioned in the Russian document about its claims. At the time, FBI agents were probing numerous hacking cases involving Democrats and other groups, but they never found an email like the one described in the document, these people said.

Then on July 5, Comey decided to announce on his own — without telling Lynch ahead of time — that he was closing the Clinton email case without recommending charges against anyone. Aides to Comey said he decided to act alone after Lynch met privately with Bill Clinton for nearly a half-hour on an airport tarmac in Phoenix about a week earlier — and have since said privately the Russian document was also a factor in that decision.

[The Clinton email probe: Questions and answers]

The appearance of possible conflict arising from the Phoenix meeting led FBI leadership to want to show it had reached the decision independently, without political interference from the Justice Department.

About a month after Comey’s announcement, FBI officials asked to meet privately with the attorney general. At the meeting, they told Lynch about a foreign source suggesting she had told Renteria that Clinton did not have to worry about the email probe, because she would keep the FBI in check, according to people familiar with the matter.

“Just so you know, I don’t know this person and have never communicated with her,’’ Lynch told the FBI officials, according to a person familiar with the discussion. The FBI officials assured her the conversation was not a formal interview and said the document “didn’t have investigative value,’’ the person said.

Nevertheless, the officials said, they wanted to give the attorney general what is sometimes referred to as a “defensive briefing’’ — advising someone of a potential intelligence issue that could come up at some future point.

The agents never mentioned Wasserman Schultz to Lynch but told her there was some uncertainty surrounding the information because of “possible translation issues,” according to a person familiar with the discussion.

Lynch told them they were welcome to speak to her staff and to conduct a formal interview of her, the person said. The FBI declined both offers.

‘I’ve never heard of him’

Renteria, a California Democrat, first heard of the Russian document and its description of her role when a Post reporter called her.

“Wow, that’s kind of weird and out of left field,’’ she said. “I don’t know Loretta Lynch, the attorney general. I haven’t spoken to her.’’

Renteria said she did know a California woman by the same name who specializes in utility issues. The Loretta Lynch in California is a lawyer who once did campaign work for the Clintons decades ago involving the Whitewater investigation. Bloggers and others have previously confused the two women, including during Lynch’s nomination to be attorney general.

Wasserman Schultz and Benardo, the alleged emailers, were also perplexed by the Russian document’s claims.

Wasserman Schultz said: “Not only do I not know him — I’ve never heard of him. I don’t know who this is. There’s no truth to this whatsoever. I have never sent an email remotely like what you’re describing.’’

She added that she had met Lynch, the former attorney general, once briefly at a dinner function.

Benardo said of Wasserman Schultz: “I’ve never met her. I’ve only read about her.”

“I’ve never in my lifetime received any correspondence of any variety — correspondence, fax, telephone, from Debbie Wasserman Schultz,’’ he said. “If such documentation exists, it’s of course made up.’’

As for Renteria, Wasserman Schultz said she knew who she was from past political work but had “virtually no interaction” with her during the 2016 campaign. “I was definitely in the same room as her on more than one occasion, but we did not interact, and no email exchange during the campaign, or ever,’’ she said.

When asked, the individuals named in the document struggled to fathom why their identities would have been woven together in a document describing communications they said never happened. But others recognized the dim outlines of a conspiracy theory that would be less surprising in Russia, where Soros — the founder of the organization Benardo works for — and Clinton are both regarded as political enemies of the Kremlin.

“The idea that Russians would tell a story in which the Clinton campaign, Soros and even an Obama administration official are connected — that Russians might tell such a story, that is not at all surprising,” said Matt Rojansky, a Russia expert and director of the Kennan Institute at the Wilson Center. “Because that is part of the Kremlin worldview.”

The secret intelligence document has attracted so much attention recently that Sen. Charles E. Grassley (R-Iowa) asked Comey about it during the director’s final public appearance in Congress as FBI director before he was fired.

Comey said that he had spoken with the heads of the congressional intelligence committees about the document privately but that it was too sensitive to discuss it in public.

“The subject is classified, and in an appropriate forum I’d be happy to brief you on it,” he told the Senate Judiciary Committee. “But I can’t do it in an open hearing.”

No such briefing occurred before he was fired.

Ellen Nakashima contributed to this report.