A federal judge temporarily blocked and financially strapped District government yesterday from firing correctional officers or other personnel at the maximum security facility at Lorton Reformatory, where the city's most dangerous convicted criminals are imprisoned.

The ruling, by U.S. District Court Judge June L. Green, was the first formal blow to Mayor Marion Barry's plans to ease his budget crisis partly through reduction of the city's work force.

Green also ordered the city to withdraw termination notices already sent to 14 correctional officers assigned to that facility, which houses about 400 inmates. Barry has planned to lay off about 20 guards in the maximum security facility.

Green's action was prompted by a lawsuit filed by maximum security inmates who said that any staff cutbacks would aggravate a dangerous security situation at the facility.

The D.C. Department of Corrections said it intended to lay off 225 employes before the end of this month -- 149 of whom wee prison guards. Although Green's action yesterday only affected guards at Lorton's maximum security facility, there were clear indications that similar court actions will be filled on behalf of employes at Lorton's larger, central facility, at the D.C. jail and at the Lorton Youth Center. l

Corrections director Delbert C. Jackson said yesterday that he is concerned more about the broader protential impact of the ruling on the entire department than about the order to withdraw the "pink slips" issued to the 14 guards.

Green scheduled another hearing on the case for April 25.

About one hour after Green reached her decision, Barry began meetings in his city hall office with Jackson and City Administrator Elijah B. Rogers. They were joined later in the day by D.C. Corporation Counsel Judith Rogers, whose office represented the city at the federal court hearing yesterday.

Jackson and Elijah Rogers said after the meeting that city officials were still assessing the potential impact of Green's ruling, and have requested further information from the Corrections Department. Jackson met with his staff late yesterday afternoon.

The ruling was perhaps the most serious in a series of recent setbacks for the mayor's plan to balance the city's budget.

Barry's proposed $24 million tax and user fee package has drawn fire from the business community and the City Council, and public pressure forced him to alter a plan to close 21 recreation centers and close only 10. In addition, Capitol Hill sources say Barry's $61.8 million supplemental federal payment request to Congress will face strong opposition.

The Greater Washington Central Labor Council has denounced Barry's plan to lay off city workers, charging that the mayor is making city workers scapegoats for mismanagement by District officials, the unwillingness of the business community to bear a larger tax burden, and the failure of Congress to approve an adequate federal payment.

The court action yesterday, although brought by inmates from the maximum security facility, was supported by sworn statements from correctional officers at those cellblocks who said that the current staff there is too small to guarantee security.

Robert Beard, a senior correctional specialist assigned to the maximum security complex, said in an affidavit that the number of correctional officers "is already woefully below the minimum required to maintain security at maximum and assure the safety of inmates and personnel."

Beard said in the statement submitted to the court that two officers, and sometimes three, are assigned to guard each cellblock. The cellblocks house as many as 100 inmates at one time.

Beard described what he called a "serious" problem at the maximum facility with weapons, both "homemade" at the institution and brought in from outside. One "inside" source of weapons, Beard said, is the facility's furniture repair shop, where he said there have been numerous reports of missing shears, hacksaws and screwdrivers. While maximum security inmates are not permitted to work in the shop, Beard said, there have been instances in which such tools have been passed on by other inmates.

Discipline is low at the maximum facility, Beard said in his sworn statement, and drug use is prevalent along with use of homemade alcohol.

A decrease in security personnel, Beard said, "will seriously increase the potential for violence and injury."

A decrease in security personnel, Beard said, "will seriously increase the potential for violence and injury."

Peter Nickles, and attorney for the inmates, yesterday described the maximum facility as a "tinderbox" full of weapons, drugs and alcohol where inmates often move around unsupervised.

Nickles told Green that the number of reported assaults within that facility for the first three months of this year exceeded the total number of assaults reported for all of 1979. Nickles and other attorneys from the Covington and Burling law firm were appointed by the court last summer to represent those inmates in a lawsuit they brought against the city in connection with conditions at the maximum secuirty facility. Green acted yesterday on a motion brought in that case based on Barry's proposed budget cutbacks.

Assistant Corporation Counsel Michael E. Zielinski told Green yesterday that the statements filed in support of the inmates were made by employes with "axes to grind against the [District] government."

Zielinski told Green that allegtions about weapons, drugs and other abuses within the maximum security cellblocks were "generalities" that cannot be supported be specific evidence. He said that any decision by Green to stop scheduled layoffs would have a substantial financial impact on the city government.

Green decided, however, to preserve the current number of correctional officers at the maximum security facility, and to order withdrawal of pink slips for 10 days until a full hearing is conducted in court.

Currently, 115 correctional officers are assigned to the maximum security facility. A city hall spokesman said yesterday that most of the 14 officers who received termination notices earn an annual salary of about $12,500.