A federal judge in San Francisco found the Office of Personnel Management unlawfully directed agencies to fire probationary federal employees en masse.

U.S District Court Judge William Alsup ruled late Friday that OPM “exceeded its own powers,” and “directed agencies to fire under false pretense,” telling probationary employees that they were being terminated for poor performance.

The ruling doesn’t reinstate any of the 25,000 probationary federal employees fired around mid-February, but it does direct many agencies to update their personnel records to specify that these employees were not fired for poor performance or misconduct. Agencies must also send letters to impacted employees starting they were not fired for performance.

The ruling, in a lawsuit led by federal employee unions, applies to the departments of Commerce, Defense, Health and Human Services, Labor, Treasury, Transportation and Agriculture. OPM, NASA, the State Department and the Office of Management and Budget are exempt from the ruling.