FILE - In this Oct. 18, 2011, file photo, then-Secretary of State Hillary Rodham Clinton checks her Blackberry from a desk inside a C-17 military plane upon her departure from Malta, in the Mediterranean Sea, bound for Tripoli, Libya. (Kevin Lamarque/Pool Photo via AP, File)

WASHINGTON (AP) — The FBI lifted a major legal threat to Hillary Clinton’s presidential campaign Tuesday, recommending no criminal charges for her handling of highly classified material in a private email account. But Director James Comey’s scathing criticism of her “extremely careless” behavior revitalized Republican attacks and guaranteed the issue will continue to dog her.

Comey’s announcement effectively removed any possibility of criminal prosecution arising from Clinton’s email practices as President Barack Obama’s secretary of state. Attorney General Loretta Lynch said last week she intended to accept the recommendations of the FBI and of career prosecutors.

But the FBI director’s blistering televised statement excoriated her handling of national secrets, contradicted her past explanations about her emails and ensured she will remain on the defensive about voters’ views of her trustworthiness and judgment.

GOP presidential candidate Donald Trump said the statement provided more evidence against “Crooked Hillary” and showed anew that “the system is rigged.” Republican House Speaker Paul Ryan said the decision not to prosecute simply defied explanation.

The findings concluded a yearlong FBI investigation into whether Clinton mishandled classified information, either intentionally or through gross negligence.

Investigators who pored over tens of thousands of emails found no proof that Clinton or her aides intended to break laws governing the handling of classified information, Comey said. But he said, “There is evidence that they were extremely careless in their handling of very sensitive, highly classified information.”

The statement was extraordinary, with Comey revealing his recommendation on live television from FBI headquarters rather than privately to Justice Department prosecutors, as is normally the case. Comey said he’d shared the FBI’s findings with no one before his announcement, which came just hours before Clinton traveled to North Carolina with Obama on Air Force One to campaign with him for the first time this year.

Comey directly contradicted many of Clinton’s past explanations in the case, including her assertion that she’d turned over all her emails and that she had never sent or received any that were classified at the time. The FBI chief said that in the course of the investigation, 113 emails were determined to contain classified information at the time they were sent or received.

He also found that “several thousand work-related emails” were not among the group of 30,000 Clinton turned over in 2014. And he raised the possibility that people hostile to the U.S. had gained access to her personal email account.

Yet after criticizing Clinton, her aides and the State Department for their actions, he said that after looking at similar circumstances in past inquiries, the FBI believed that “no reasonable prosecutor would bring such a case.”

“No charges are appropriate in this case,” said Comey, who began a 10-year term as FBI director in 2013, meaning he would remain if she is elected president.

Comey’s announcement came three days after the FBI interviewed Clinton in a final step of its yearlong investigation.

“There is evidence to support a conclusion that any reasonable person in Secretary Clinton’s position … should have known that an unclassified system was no place” for sensitive conversations, Comey said.

Nor will the recommendation stop Trump, who has called for criminal charges, from continuing to make her private email server a campaign issue. After Comey’s announcement, Trump tweeted, “The system is rigged … Very very unfair! As usual, bad judgment.”

House Speaker Ryan of Wisconsin said the decision defied explanation, adding: “No one should be above the law.”

Clinton campaign spokesman Brian Fallon voiced approval for the decision but reiterated that it had been a “mistake” for Clinton to use personal email.

Clinton’s personal email server, which she relied on exclusively for government and personal business, has shadowed her campaign since The Associated Press revealed its existence in March 2015.

She has repeatedly said that no email she sent or received was marked classified, but the Justice Department began investigating last summer following a referral from the inspectors general for the State Department and the intelligence community.

The scrutiny was compounded by a critical audit in May from the State Department’s inspector general, the agency’s internal watchdog, that said that Clinton and her team ignored clear warnings from department officials that her email setup violated federal standards and could leave sensitive material vulnerable to hackers. Clinton declined to talk to the inspector general, but the audit said that she had feared “the personal being accessible” if she used a government email account.

The Clinton campaign said agents interviewed her last Saturday for three and one-half hours at FBI headquarters. Agents had earlier interviewed top aides including her former State Department chief of staff, Cheryl Mills, and Huma Abedin, a longtime aide who now is the vice chairwoman of Clinton’s campaign.

The staff member who set up the server, Bryan Pagliano, was granted limited immunity from prosecution by the Justice Department last fall in exchange for his cooperation.

Lynch said Friday that she would accept whatever findings and recommendations were presented to her. Though she said she had already settled on that process, her statement came days after an impromptu meeting with former President Bill Clinton on her airplane in Phoenix that she acknowledged had led to questions about the neutrality of the investigation.