Three former senior FBI officials filed a lawsuit on Wednesday alleging they were dismissed in a "campaign of retribution" by the Trump administration for failing to demonstrate "sufficient political loyalty," and that their firings violated their constitutional rights.

The suit, brought by former Acting FBI Director Brian J. Driscoll Jr., former Assistant Director in Charge of the FBI’s Washington field office Steven J. Jensen, and former Special Agent in Charge of the Las Vegas field office Spencer L. Evans, accuses FBI Director Kash Patel of illegally terminating the officials on Aug. 8 at the direction of the Department of Justice and the White House. The complaint asserts violations of the First and Fifth Amendments, including claims for deprivation of due process, free association and free speech. The defendants named include Patel, Attorney General Pam Bondi, the FBI, the Department of Justice and the executive office of the President.

According to the complaint, Driscoll was told by Patel that senior officials at the Justice Department and the White House had instructed Patel to fire anyone who had worked on criminal investigations into President Donald Trump, and that Patel needed to carry out those dismissals to keep his own job. The lawsuit quotes Patel as saying, "The FBI tried to put the President in jail and he hasn’t forgotten it." The plaintiffs say Patel also acknowledged that the summary firings were likely illegal and that he could be sued and later deposed.

The complaint details a series of events in the weeks and months surrounding the changes in administration that the plaintiffs say demonstrated political pressure to purge officials who had handled sensitive investigations. It alleges that, in January, Driscoll faced what he viewed as inappropriate and political questioning about whom he voted for, his views on diversity, equity and inclusion, and when he began supporting Trump. That call, the suit says, was presented as an interview to determine Driscoll’s fitness for a senior FBI position even though he already held a senior post.

The filing further alleges that in January, Emil Bove — later confirmed to an appeals court judgeship — asked Driscoll for a list of officials who had taken part in the federal investigation of the Jan. 6, 2021, attack on the U.S. Capitol. The complaint also notes that the Justice Department in January dismissed more than a dozen officials who had worked on federal criminal investigations into Trump. Plaintiffs say they collectively had about 60 years of service, had received awards, and would have been eligible for retirement upon turning 50; Evans was reportedly eligible for early retirement but was not offered that option.

The suit also points to public statements made by Patel after his confirmation. During his Senate confirmation hearings, Patel pledged to hold FBI employees to the "absolute same standard" and said workers would be "protected against political retribution," but he did not directly answer whether he would fire agents who had worked on special counsel investigations into Trump or whether he would resign if asked to do something illegal. Plaintiffs say a later appearance by Patel on Fox Business, in which he said every person found to have "weaponized or participated" in criminal investigations into the President had been removed from leadership and that further action would be taken, harmed their reputations and employment prospects.

The FBI declined to comment on the lawsuit. TIME reported that it had reached out to the Justice Department for comment. The complaint seeks remedies for the alleged constitutional violations and challenges the legality of the dismissals as part of a broader pattern of politically motivated personnel actions.

The plaintiffs' filing arrives amid heightened scrutiny of recent personnel changes at law enforcement and national security agencies. The lawsuit lays out a timeline of interactions and decisions the plaintiffs say led to their abrupt dismissals and frames those actions as part of an effort to politicize the FBI rather than protect public safety. The case is expected to proceed through federal court, where the parties will litigate the factual assertions and constitutional claims contained in the complaint.