(CNN) Peter Strzok, the fired former FBI agent who played a senior role in the early Russia-Trump campaign investigation, is suing the Justice Department for back pay and to get his job back, according to a lawsuit he filed in DC District Court on Tuesday.

Strzok claims his termination in August 2018 came because of political pressure on the FBI from President Donald Trump after he criticized Trump and made political comments in text messages in 2016.

In summer 2017, former special counsel Robert Mueller removed Strzok from his team investigating Russian interference in the 2016 election after an internal investigation first revealed texts with former FBI lawyer Lisa Page, with whom Strzok had an extramarital affair, that could be read as exhibiting political bias.

Lawmakers received several tranches of recovered messages between Strzok and Page in 2018, including several messages referring to Trump.

Page wrote in one text during the summer before the 2016 presidential election, Trump is "not ever going to become president, right? Right?!" to which Strzok replied, "No. No he's not. We'll stop it." Strzok told Congress last July that his text was "off the cuff" and based on his belief that voters would not support Trump after his behavior as a candidate.

Republican Rep. Mark Meadows of North Carolina then released specific extracts in September, which he argued -- in a letter to the Justice Department -- "suggest a coordinated effort on the part of the FBI and DOJ to release information in the public domain potentially harmful to President Donald Trump's administration." But Strzok's lawyer Aitan Goelman argued at the time that "the term 'media leak strategy' in Mr. Strzok's text refers to a Department-wide initiative to detect and stop leaks to the media."

Strzok also alleges in Tuesday's lawsuit that the Justice Department illegally released his intended-to-be-private text messages to the media in a violation of his right to privacy.

"The Trump Administration has consistently tolerated and even encouraged partisan political speech by federal employees, as long as this speech praises President Trump and attacks his political adversaries," his complaint said.

He called his firing "viewpoint discrimination" and claims it is part of "broader campaign against the very principle of free speech underlying the First Amendment, initiated and led by a President" who attacks the media, wants some opinions censored and prompted the withdrawal of Strzok's and others' security clearances, according to the lawsuit.

Goelman said in a statement that Strzok "has been a constant target for two years," calling it "indisputable that his termination was a result of President Trump's unrelenting retaliatory campaign of false information, attacks and direct appeals to top officials."

"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," Goelman added.