A four-year probe by the Justice Department’s inspector general could not determine who in the FBI spoke to reporters about sensitive subjects during the 2016 election, or find evidence that Rudolph W. Giuliani had inside information about an investigation into Hillary Clinton that upended the race in its final days.

The report issued Thursday by Inspector General Michael Horowitz said there were “substantial media contacts” with numerous FBI employees, but the evidence could not determine “whether these media contacts resulted in the disclosure of nonpublic information.”

Horowitz faulted what he called “a cultural attitude at the FBI that was far too permissive of unauthorized media contacts in 2016.”

The 10-page report is the long-awaited summary of an issue that consumed the FBI and Justice Department during the presidential contest between Clinton and Donald Trump. The FBI director at the time, James B. Comey, told the inspector general that he was determined to find out who was leaking to reporters, particularly after articles about internal disputes between the Justice Department and the FBI over how to handle a faltering probe of the Clinton Foundation.

While those stories were being reported in late October of 2016, Comey announced publicly that he was reopening an investigation into Clinton’s use of a private email server that contained classified information, based on copies of her emails that had been found in a separate case. That announcement came two weeks before Election Day.

A 2018 inspector general report about the Clinton case was highly critical of Comey and his former boss, then-Attorney General Loretta E. Lynch. But Horowitz’s office spent three more years working on the leak-hunting portion of the investigation, and came up largely empty.

Horowitz said there were simply too many contacts between reporters and the FBI to determine who might have told journalists about sensitive details of cases. His office did find misconduct by three senior FBI officials who accepted things of value from reporters, like tickets to a baseball game, or a seat at a dinner function.

The bureau has since taken steps “to improve the FBI’s cultural attitude regarding unauthorized contacts with the media, including by improving training and aligning its disciplinary penalties so that they are sufficient to deter unauthorized contact with the media,” Horowitz’s report said. “We believe it is important for the FBI to remain vigilant in these efforts.”

The inspector general also said he referred six FBI employees found to have had unauthorized contacts with reporters to senior bureau managers, who will review their cases and consider disciplinary action; his report says investigators could not determine whether those contacts resulted in disclosures of any sensitive information.

The findings on Giuliani’s pre-election claims are emblematic of a long-running leak investigation that ultimately led nowhere.

Two days before Comey’s announcement, Giuliani — a former U.S. Attorney in New York who had become an outspoken Trump supporter — said on Fox News that the GOP nominee had “a surprise or two that you’re going to hear about in the next few days. I mean, I’m talking about some pretty big surprises.”

After Comey’s announcement, suspicions intensified that Giuliani had inside information about the Clinton case. At first, he suggested in an interview that he did. But he quickly backtracked, saying he had been talking about a surprise involving some of the women who had previously accused former president Bill Clinton — Hillary Clinton’s husband — of sexual misconduct.

When he was interviewed by investigators, Giuliani said he had not talked to any active FBI agents, and Comey’s statements “were a shock to me. I had no foreknowledge of any of them.”

The inspector general said the FBI gave his office bad leads when it came to the Giuliani investigation — the names of four agents who, the FBI said, had telephone records indicating contact with Giuliani in the relevant time period.

Those four agents were all questioned and denied being in touch with Giuliani then, leading the inspector general to take a closer look at the FBI’s evidence.

The phone numbers, it turned out, involved two that were general lines for the New York office of a law firm where Giuliani was a partner, and two other numbers for businesses at which Giuliani had not been affiliated “since at least before 2007. The telephone numbers attributed by the FBI to Giuliani were not, therefore, specific to Giuliani. Accordingly the purported investigative leads provided by the FBI based on alleged employee contacts with Giuliani were inaccurate.”

A lawyer for Giuliani did not immediately comment on the findings.

A spokeswoman for Horowitz, who has been the Justice Department inspector general since 2012, did not respond to a request for comment about the length of the leak investigation.

In a letter responding to the findings, FBI Assistant Director Douglas Leff said the bureau “will continue to be vigilant with its enforcement of the media policy.” Leff’s letter did not address the Giuliani portion of the investigation.