A federal judge yesterday ordered the District of Columbia government to employ an additional 30 guards at the maximum-security facilty at Lorton Reformatory to ensure that a minimum level of safety is maintained there.

U.S. District Judge June L. Green, acting in a law suit brought by maximum security inmates, also ordered the city government to take several specific steps to reduce violence at that facility.

Those steps ordered by Green include placement of metal detectors at the entrance of each cellblock at the facility, and a requirement that guards be provided with "panic buttons" to be used when they need assistance and hand-held "friskers" to be used during searches for weapons and other contraband.

Green, in a four-page order, said that the city must present to the court by July 10 a timetable for deployment of the expanded guard force and implementation of the new security measures within the maximum-security facility.

Green's decision came after a federal jury last week awarded about $600,000 in damages to 400 inmates in maximum-security who had contended that the city had failed to provide adequate internal security.

City officials said late yesterday that they had not seen Green's decision and would have no comment. It was unclear late yesterday whether the city would have to hire new employes to increase the guard force or whether it could be carried out through transfers.

Green also ordered the District to relocate at once a furniture repair shop now situated in the maximum security compound. The shop is regarded as a major source of tools that are used by inmates as weapons.

Green also ordered immediate repairs in a classroom building where inmates have used a hole in the ceiling to enter a crawl space to hide weapons and to use as an avenue to move above the building without being detected.

Green also ordered that security screens be placed in dining hall and kitchen areas where equipment is often stolen and then converted into weapons.

Green's order yesterday essentially paralleled security improvements recommended to Lorton officials in a report written a year ago by Maj. William Long, director of operations at the maximum security facility.

"The correction staff is undermanned and they are unable to conduct thorough and efficacious searches of residents and their cells to control the presence of weapons and other contraband," Green said on her order, which completed the second stage of the inmates lawsuit.

"Assaults of inmate on inmate and inmate on correctional officier have increased dramatically during the first half of 1980," Green said in her order.

The court order yesterday requires the city to employ 152 guards for assignment throughout the maximum security facility. In a related development yesterday, before Green set that employment level, she held the city government in contempt of court for violation of an earlier order to keep the employment force at 122 guards and staff members. That staff level was set by the court two months ago when the city attempted to reduce the guard staff at the maximum security facility as part of its budget cuts.

Yesterday, Green declined to impose any fine on the city for the violation, noting that any penalty would ultimately be paid by local taxpayers and divert money that could be spent at Lorton.

Green did tell city officials, however, that they would have to pay attorney's fees and court costs to lawyers from the prestigious Washington law firm of Covington & Burling, who ought to contempt ruling on behalf of the maximum security inmates. Those lawyers also represented the prisoners for free in their class action law suit against the city.

Green told the lawyers to file their estimated bill with the court.

"It's not going to be inexpensive . . . This one is not a freebie," said Peter J. Nickles, a partner at Covington and lead counsel for the inmates.

After a hearing yesterday, Green found that from May 27 until last Friday, the city had failed to have 122 on duty although both she and the U.S. Court of Appeals had been assured by city officials that there would be no reduction in force.

Lawyers for the cty blamed the shortfall on a misunderstanding of the court's order by D.C. Corrections officials and a breakdown in communications within that department. The city also argued that some correctional personnel had simply failed to report for duty and that caused temporary reductions in force.

In another developement yesterday, around 15 correctional officers from the D.C. Jail met with Mayor Barry to protest planned layoffs of jail guards. The officiers threatened to take the matter to court later this week unless the city changes its plans.

Barry promised to meet further with the guards today to explore any Lorton layoffs have encountered in possible alternatives. "The whole question . . . may be academic," Barry said, referring to the setbacks the Lorton layoffs have encountered in the courts.