FBI Director James B. Comey. (J. Scott Applewhite/Associated Press)

IT WAS disruptive enough that James B. Comey, director of the Federal Bureau of Investigation, injected last-minute uncertainty into the presidential campaign by announcing discovery of additional emails in the investigation of Hillary Clinton’s private server. Mr. Comey’s explanation for the disclosure, that he needed to keep Congress informed, was dubious, and the damaging impact, casting a new shadow over Ms. Clinton, was tangible. In the days since, the FBI’s behavior has grown even more questionable. FBI sources have fanned new doubts about Ms. Clinton’s candidacy with inaccurate leaks about an investigation of the Clinton Foundation. This reflects poorly on Mr. Comey’s leadership and on the FBI.

Former attorney general Eric H. Holder Jr. wrote in The Post the other day that the Justice Department, which includes the FBI, “has a policy of not taking unnecessary action close in time to Election Day that might influence an election’s outcome.” Mr. Holder said rules he approved “are intended to ensure that every investigation proceeds fairly and judiciously; to maintain the public trust in the department’s ability to do its job free of political influence; and to prevent investigations from unfairly or unintentionally casting public suspicion on public officials who have done nothing wrong.”

The FBI, or at least a part it, has blasted right through Mr. Holder’s rules. According to reports Wednesday in the Wall Street Journal and Thursday in The Post, agents based in New York thought they should investigate whether donors to the Clinton family charity were given improper benefits by the State Department when Ms. Clinton was secretary. They were motivated in part by “Clinton Cash,” a book by the conservative author Peter Schweizer that was published in May 2015. According to The Post’s account, when the FBI agents took their desire to probe the foundation to higher-ups, they were advised the evidence was thin. Nothing abnormal about that; prosecutors and officials use their judgment about what cases to pursue all the time.

But this group of New York agents apparently was unsatisfied, and someone decided to prosecute the case through leaks days before the presidential election. Most irresponsible of all was Fox News anchor Bret Baier, who declared an “avalanche” of evidence is “coming every day” and an “expansive” investigation into the foundation was ongoing and would lead “to likely an indictment.” Without any substantiation whatsoever — indictments are returned by grand juries, not by special agents of the FBI — the headlines took off. The false report of an impending indictment was then repeated by Donald Trump. Mr. Baier apologized on Friday for a “mistake,” but the political damage had already been done.

We can only guess at the motives of the FBI agents behind this politicization of law enforcement, but their behavior is sickening. The campaign has been hard enough with the ugly chants of “lock her up.” The last thing we need is to find the fingerprints of the nation’s premier law enforcement agency all over an 11th-hour smear of Ms. Clinton.

The Post’s Matt Zapotosky explains why FBI Director James B. Comey has found himself at the center of the presidential campaign in recent days. (Bastien Inzaurralde/The Washington Post)