Former FBI agent Peter Strzok is suing the FBI and the Department of Justice over his firing, claiming his removal was “politically-driven and illegal,” an attorney for the disgraced bureau employee said Tuesday.

“The campaign to publicly vilify Special Agent Strzok contributed to the FBI’s ultimate decision to unlawfully terminate him,” the lawsuit says, “as well as to frequent incidents of public and online harassment and threats of violence to Strzok and his family that began when the texts were first disclosed to the media and continue to this day.”

Strzok, a veteran counterintelligence agent who helped lead FBI investigations into Hillary Clinton’s use of a private email server and ties between the Trump campaign and Russia, was removed from special counsel Robert Mueller’s team after the texts with FBI lawyer Lisa Page came to light. He was fired from the FBI last August.

Many of the texts, on FBI cell phones, were bitingly critical of Trump during his 2016 run for office. They were found by the Justice Department’s inspector general during its investigation of the FBI’s Clinton email probe.

In an October text message, Strzok wrote to Page: “I am riled up. Trump is a fucking idiot, is unable to provide a coherent answer. I can’t pull away. What the fuck happened to our country??!?!”

“[Trump’s] not ever going to become president, right? Right?!” Page wrote Strzok in August 2016 to which he wrote back: “No. No he’s not. We’ll stop it.”

The watchdog office criticized both Strzok and Page, with whom he was having an affair, for their judgment in sending the messages but did not find that the Clinton email investigation was compromised by political bias.

In the lawsuit, Strzok attorney Aitan Goelman says the FBI deputy director who fired him was responding to “unrelenting pressure from President Trump and his political allies in Congress and the media.”

Then deputy, David Bowdich, overruled the recommendation of a disciplinary official that he be merely demoted and suspended without pay and denied him the chance to appeal.

A GoFundMe page set up on behalf of Strzok around one year ago has raised nearly $450,00o. It is unclear if the funds raised will go towards paying lawyers in his lawsuit against the FBI and DOJ.

The Associated Press contributed to this report.