A former chief ethics lawyer at the White House, who served during George W. Bush’s presidency, has filed an ethics complaint against FBI Director James Comey. In an op-ed published in the New York Times on Sunday, Richard W. Painter writes that he filed a complaint against the FBI for violating the Hatch Act, “which bars the use of an official position to influence an election.” He filed the complaint with both the Office of Special Counsel and the Office of Government Ethics.

Painter, who was the head White House ethics lawyer between 2005 and 2007 and now supports Hillary Clinton, says Comey violated the Hatch Act when he sent the letter to lawmakers on Friday informing them of the newly discovered emails. “This letter, which was quickly posted on the internet, made highly unusual public statements about an FBI investigation concerning a candidate in the election,” writes Painter. “The letter was sent in violation of a longstanding Justice Department policy of not discussing specifics about pending investigations with others, including members of Congress.”

Although Comey’s previous statements may be concerning, there is no actual evidence yet that the FBI director actually wanted to influence the election. Still, that is irrelevant as far as the Hatch Act is concerned.

Painter also warns that letting this precedent stand would be dangerous:

This is no trivial matter. We cannot allow FBI or Justice Department officials to unnecessarily publicize pending investigations concerning candidates of either party while an election is underway. That is an abuse of power. Allowing such a precedent to stand will invite more, and even worse, abuses of power in the future.

Speaking to LawNewz.com, Painter says he doesn’t buy the argument that Comey had to send the letter because he had promised to update lawmakers on the issue. The FBI director could have easily sent the letter two weeks later, after voters had gone to the polls, and no one would have been able to argue that he “breached that promise to update,” particularly considering the reports that “the FBI apparently had not even looked at the emails because they did not have a search warrant.”