Former FBI Deputy Director Andrew McCabe is suing the Justice Department and the FBI for violating his First Amendment rights by firing him for his "refusal to pledge partisan allegiance" to President Trump.

Context: McCabe, who opened a counterintelligence investigation into whether Trump was acting as an agent of Russia after the firing of FBI Director James Comey, was fired by then-Attorney General Jeff Sessions in March 2018 after the Justice Department's inspector general found that he had "made an unauthorized disclosure to the news media and lacked candor − including under oath − on multiple occasions." The termination came hours before McCabe's formal retirement was set to kick in, threatening his pension.

McCabe was a frequent target of Trump's Twitter attacks throughout 2017 and 2018, with the president accusing him and the Russia investigation of being politically motivated on dozens of occasions.

of Trump's Twitter attacks throughout 2017 and 2018, with the president accusing him and the Russia investigation of being politically motivated on dozens of occasions. The lawsuit quotes a number of Trump's tweets attacking McCabe and his wife, whose donations to Hillary Clinton were used by the president to cast doubt on McCabe's impartiality: "How can FBI Deputy Director Andrew McCabe, the man in charge, along with leakin’ James Comey, of the Phony Hillary Clinton investigation (including her 33,000 illegally deleted emails) be given $700,000 for wife’s campaign by Clinton Puppets during investigation?”

of Trump's tweets attacking McCabe and his wife, whose donations to Hillary Clinton were used by the president to cast doubt on McCabe's impartiality: "How can FBI Deputy Director Andrew McCabe, the man in charge, along with leakin’ James Comey, of the Phony Hillary Clinton investigation (including her 33,000 illegally deleted emails) be given $700,000 for wife’s campaign by Clinton Puppets during investigation?” It also notes that Trump publicly celebrated McCabe's termination: "Andrew McCabe FIRED, a great day for the hard working men and women of the FBI - A great day for Democracy. Sanctimonious James Comey was his boss and made McCabe look like a choirboy. He knew all about the lies and corruption going on at the highest levels of the FBI!"

The big picture: The lawsuit alleges that Trump's pressure on the FBI to fire McCabe were part of his "unconstitutional plan and scheme to discredit and remove DOJ and FBI employees who were deemed to be his partisan opponents because they were not politically loyal to him."

It comes just two days after news that former FBI Deputy Assistant Director Peter Strzok is also suing the Justice Department for firing him after the discovery of 2016 texts in which Strzok "expressed his political opinions" about then-candidate Donald Trump.

McCabe, like Strzok, is requesting backpay, a declaration that his firing was "a legal nullity" because he had already retired by the time the termination order was issued, and reinstatement as deputy director to a date that would allow him to receive his full retirement benefits.

Read the lawsuit: