WASHINGTON (AP) — The Justice Department’s investigation into Hillary Clinton’s email setup has been formally closed without any criminal charges, Attorney General Loretta Lynch said Wednesday.

The decision had been expected and was largely a formality given FBI Director James Comey’s recommendation a day earlier against any prosecution. Even before Comey’s public statement, Lynch had said she intended to accept the recommendations of the FBI director and of her career prosecutors.

Even so, it officially closes out an FBI investigation that had dogged Clinton for the last year and had proved a distraction on the campaign trail.

Lynch said she met with Comey and prosecutors Wednesday and agreed that the investigation, which looked into the potential mishandling of classified information, should be concluded.

“I received and accepted their unanimous recommendation that the thorough, year-long investigation be closed and that no charges be brought against any individuals within the scope of the investigation,” Lynch said in a statement.

Comey, in an unusually detailed and public accounting of the investigation Tuesday, said “no reasonable prosecutor” would pursue a criminal case and said he was advising the Justice Department against bringing any charges. But he also rebuked Clinton, who relied exclusively on a private email server as secretary of state, and her aides for being “extremely careless” with their handling of classified information.

Comey was scheduled to face questions about that decision in an appearance Thursday before a House committee.

FBI agents spent the last year investigating the matter following a referral from the intelligence community’s inspector general. As part of that investigation, investigators pored through tens of thousands of State Department emails and interviewed top Clinton aides — and finally, Clinton herself this past weekend.

Lynch on Friday announced she was prepared to endorse whatever findings and recommendations were presented to her. Though she said she had already settled on that process, the announcement came just days after she had an unscheduled meeting with Bill Clinton aboard her plane in Phoenix. Lynch said the investigation as not discussed, but she acknowledged that the meeting had “cast a shadow” on the process and led to questions about the independence of the investigation.