A top D.C. Department of Corrections official testified in court yesterday that he was instructed earlier this year to ignore a federal judge's orders to relieve overcrowding among prisoners at the D.C. Jail.

George Holland, assistant corrections director for detention services, told U.S. District Court Judge William B. Bryant that he could no longer recall from whom he had received his instructions. As a result of policies Holland implemented in March, pretrial inmates were housed two to a cell for months at a time.

Bryant had prohibited the city from holding pretrial inmates in such conditions for more than 30 days on grounds that it would be "dehumanizing." He is considering whether to hold city officials, including Mayor Marion Barry, in contempt for violations of the orders he issued last year.

Bryant yesterday ordered attorneys for the city and jail inmates to file final briefs in the matter by Friday.

The judge was visibly perturbed yesterday as Holland testified that, after meetings with then-city administrator Elijah Rogers and D.C. Corporation Counsel Judith Rogers, he was told it would be all right to ignore the 30-day limitation as long as inmates consented.

There simply was no other space at the jail to put the prisoners, Holland said.

He noted that other inmates already were being held in makeshift facilities in the jail's gymnasiums and recreation rooms.

"We knew we were in violation," Holland said. "We knew we were between a rock and a hard place, and we were trying to work it out as best we could."

Holland testified that he thought the city should approach Bryant and tell him the city was unable to comply with the judge's orders. Holland said he could not explain why that was never done.

D.C. corrections director James Palmer, who also testified at yesterday's court hearing, painted a picture of an agency in disarray as he described the conditions he found on assuming the director's post earlier this year.

According to Palmer, he had been assured by staff members that they were complying fully with Bryant's orders and was not aware until April that those orders had been violated on a wholesale basis.

Major disturbances at the jail last month, including one incident in which inmates set fire to mattresses, forced corrections officials to immediately transfer about 450 inmates to facilities at the District's Lorton Reformatory.

Before the transfers, more than 2,400 inmates were being held at the jail, which was built to hold 1,355.

Holland testified yesterday that corrections officials became aware soon after Bryant issued his orders in December that they would be almost impossible to carry out.

The orders, which were issued in part to help relieve overcrowding at Lorton Reformatory, allowed the city to place two prisoners in each cell at the jail under certain conditions.

The conditions prohibited holding pretrial inmates two to a cell for more than 12 hours a day or longer than 30 days.

The orders also required jail officials to keep precise records of how long inmates were allowed out of their cells each day.

In March, Corporation Counsel Rogers sent corrections officials an opinion stating that the city could meet the judge's conditions by having inmates sign forms consenting to placement of two prisoners per cell.

Holland testified yesterday that he assumed Bryant would be notified of the consent procedures. The notification never took place.

City officials have told Bryant they should not be held in contempt because of stepped-up efforts to move jail inmates to new facilities at Lorton. But that, too, could pose a problem for the city in court.

Earlier, the city agreed to hold inmate populations at Lorton's central and maximum-security facilities to 1,166 because of a suit brought by inmates protesting conditions there. The transfer last month of the 450 jail inmates to those facilities has pushed the population at the Lorton units to more than 1,300, prompting Judge June L. Green to schedule a court hearing on the matter for Monday.