
Many of the officers had been ordered to take positions in recruiting under the previous C.I.A. director.
A federal district judge on Thursday allowed the C.I.A. director, John Ratcliffe, to fire intelligence officers who had worked on diversity issues, a decision that could clear the path for the termination of other employees at the spy agency.
Speaking from the bench, Judge Anthony J. Trenga said he would have ruled differently if the issue had been basic fairness. But he said the law and regulations gave Mr. Ratcliffe unfettered authority to fire employees at will, and without the review of the courts.
The decision came as the agency moved to comply with President Trump’s executive order banning efforts to diversify the federal work force.
U.S. officials have not specified how many intelligence officers would be dismissed as part of that push. Lawyers for the officers said the agency had moved to fire as many as 51 so far. The agency is also considering taking action against some probationary employees and has encouraged some midcareer employees to consider leaving.
Ten of the intelligence officers who had sued to stop their firing were in the courtroom as the judge made his decision on a temporary restraining order. They looked dejected as the judge ruled that their complaint was unlikely to succeed and said he would not issue a restraining order.
In court proceedings, Kevin Carroll, the lawyer for the plaintiffs, has argued that his clients and the other officers the C.I.A. intends to fire had done nothing wrong, and in fact received offers for other roles in the C.I.A. One data scientist, he said, had nine different offers for jobs within the agency.