(Bloomberg) — A former FBI agent sued the Justice Department to get his job back, claiming he was unlawfully fired over his text messages critical of Donald Trump after the bureau caved in to pressure from the president.

Peter Strzok claims his firing was fueled by the illegal disclosure of messages he traded with now-former FBI attorney Lisa Page, with whom he was having an affair.

Strzok says the messages were protected political speech. In one exchange, Page asked Strzok whether Trump would ever become president, to which the agent replied, “No, he’s not. We’ll stop it.”

His firing in August of last year “was the result of unrelenting pressure from President Trump and his political allies in congress and the media,” according to the lawsuit. “The campaign to fire Strzok included constant tweets and other disparaging statements by the president, as well as direct appeals from the president to then-Attorney General Jefferson Sessions and FBI Director Christopher Wray to fire Strzok, which were chronicled in the press.”

Trump referred to Strzok by name on 43 separate occasions on Twitter between Dec. 3, 2017, and May 12, 2019.

In a March interview on Fox News with Sean Hannity, the president accused Strzok and Page of treason.

Strzok also sued U.S. Attorney General William Barr, the FBI and Wray. The suit was filed Tuesday in a Washington federal court.

Strzok was part of Special Counsel Robert Mueller’s team investigating Russian interference in the 2016 election. He was fired after the texts came to light. He claims that decision, which overrode an internal determination that he be demoted and suspended without pay for 60 days, wrongfully deprived him of the right to appeal and other rights.

Justice Department spokeswoman Kerri Kupec declined to comment on the former agent’s lawsuit.

Strzok is seeking reinstatement and back pay, plus additional money damages.

Contact us at letters@time.com.