Peter Strzok, the former FBI agent fired over anti-Trump text messages, sued the Justice Department and the FBI Tuesday, claiming that he was fired due to political pressure from President Donald Trump.

In the lawsuit, filed against Attorney General William Barr and FBI Director Christopher Wray, Strzok also alleged that his First Amendment rights were violated, as was his privacy due to leaks of his text messages to the media.

“The FBI fired Special Agent Strzok because of his protected political speech in violation of his rights under the First Amendment to the Constitution of the United States,” reads the lawsuit, which seeks back pay and Strzok’s reinstatement to the FBI.

Strzok was a lead investigator on both the Hillary Clinton email investigation and the Trump-Russia probe. As deputy chief of counterintelligence, Strzok opened the FBI’s investigation of the Trump campaign on July 31, 2016.

He joined the special counsel’s team shortly after it was formed on May 17, 2017, but was removed from the investigation in late July 2017 after the Justice Department’s inspector general discovered that Strzok and his mistress, an FBI lawyer named Lisa Page, had exchanged numerous text messages criticizing Trump.

In some exchanges, Strzok and Page spoke of preventing Trump from winning the 2016 election.

On Aug. 8, 2016, Strzok assured Page that “we’ll stop” Trump from becoming president. On Aug. 15, 2016, Strzok said that the FBI needed an “insurance policy” in case Trump was elected. (RELATED: STRZOK: ‘We’ll Stop’ Trump Presidency)

Strzok insists in the lawsuit that his anti-Trump text messages are protected by the First Amendment, and that he was the victim of “unrelenting pressure from President Trump and his political allies in Congress and the media.”

“The campaign to fire Strzok included constant tweets and other disparaging statements by the President,” the lawsuit says.

He also alleges that his firing was the result of “unlawful disclosure to the media of texts, intended to be private, from an FBI systems of records.”

Despite the privacy claim, Strzok and Page exchanged their politically-charged text messages on FBI-issued smart phones. The Justice Department inspector general reviewed the cell phones and those of other FBI employees as part of an investigation into the bureau’s handling of the Clinton email probe.

The Washington Post and New York Times first reported on Dec. 1, 2017 that Strzok had been removed from the special counsel’s team months earlier because of his text messages. The source of the leak has yet to be identified, but Strzok says that discovery in his lawsuit will likely identify the leakers.

The lawsuit also alleges that FBI Deputy Director David Bowdich rejected a recommendation from the FBI’s Office of Professional Responsibility (OPR) to “suspend and demote, rather than fire” Strzok.

According to the lawsuit, Candice Will, the head of OPR, rejected a proposal to fire Strzok. Instead, she recommended that Strzok be suspended without pay for 60 days and demoted, the lawsuit says.

Bowdich rejected the recommendation and fired Strzok on Aug. 9, 2018.

“While many in law enforcement have faced attacks by this president, Pete Strzok has been a constant target for two years. It’s indisputable that his termination was a result of President Trump’s unrelenting retaliatory campaign of false information, attacks and direct appeals to top officials,” Aitan Goelman, a lawyer for Strzok, said in a statement announcing the lawsuit.

“The lawsuit shows that, in bowing to the president’s desires, FBI leaders trampled Pete’s free speech and due process rights in ways that should be deeply troubling to all in government, and indeed, to all Americans. Today, Pete Strzok is fighting back, and sending a message that the Administration’s purposeful disregard for constitutional rights must not be tolerated.”

Content created by The Daily Caller News Foundation is available without charge to any eligible news publisher that can provide a large audience. For licensing opportunities of our original content, please contact licensing@dailycallernewsfoundation.org.