A D.C. Superior Court judge yesterday blocked efforts by the District of Columbia to lay off 121 officers at Lorton prison today to help trim its budget.

Judge John D. Fauntleroy's ruling will not affect the city's plans to dismiss 75 nonsecurity employes of the Department of Corrections later this month and in June. But it will protect 29 officers at Lorton and the D.C. Jail scheduled to be laid off later on.

Fauntleroy agreed with 12 Lorton employes, members of Local 1550 of the American Federation of Government Employes, that reducing the number of jail officers would endanger the lives of the facility's staff. Through all corrections department layoffs, the financially strapped District government hoped to save $1.5 million to reduce a deficit that could go as high as $172 million.

Attorney Steuart A. Krisch, representing the union employes, argued that if Mayor Marion Barry laid off correctional employes, he would violate a law that requires him to provide a "safe and healthful work environment" for all city employes.

Assistant Corporation Counsel Leonard Bren argued that if the mayor were not allowed to reduce the staff, he might violate requirements that the city stay within its congressional appropriations.

Under Fauntleroy's ruling, 121 correctional officers who had been sent dismissal slips will remain on the job. Seventy-five support staff members scheduled for dismissal -- including four who have been issued pink slips -- will be laid off as planned.

In a separate suit filed by Lorton inmates and based on constitutional questions, U.S. District Judge June L. Green had issued an order in late April blocking the city from firing 14 correctional officers at Lorton's maximum security section. The U.S. Court of Appeals later granted a stay of Judge Green's order.

But the order issued by Fauntleroy once again blocked the city from firing the guards, this time 121 of them.