Shortly after breakfast yesterday morning a 31-year-old man, serving 60 days in the D.C. jail for attempted petty larceny, asked a fellow inmate passing his cell for a match. When he was refused, the man stepped back from the door, took out a knife he had hidden, and plunged it into his stomach.

He had served 10 days of his sentence, all of it in "Southeast 3" the section of the new jail annex reserved for inmates with real or suspected mental illnesses. As he drove the knife into his belly, an inmate in a nearby cell was singing the same song over and over again until the cinderblock walls reverberated like a locker room.

The man with the knife wound was taken to nearby D.C. General Hospital, where he was reported to be in satisfactory condition.

U.S. District Court Judge William B. Bryant had ordered the city government on Monday to upgrade conditions in Southeast 3 to "minimum standards of decency" within 60 days, after finding that inmates there lived in what was described as "bedlam."

If it is "bedlam" -- a term that comes from to name of an old English insane asylum -- it is the 20th century variety.Here, in immaculately clean hallways, with floors of blue linoleum, 80 inmates sit behind green cell doors, reading, writing, or staring at cinderblock walls for most of the day.

Security considerations of the corrections officials who run the jail keep the inmates in the cellbock. Unlike regular inmates, they are never allowed outdoors. A few at a time are permitted to socialize in the main corridor or television room or take showers -- but for no more than an hour a day. The two "mental health technicians" -- psychiatric social workers -- are on duty from 7:30 a.m. to 4 p.m. Aided by three trainees, they try to take as many inmates out of their cells as they can for rap sessions or private talks, "just to get them out more than an hour a day," said one.

But because they have as many as 55 inmates to care for each day, perhaps only a third get extra time outside their 10-by-7-foot cells.

"The overall thinking of this jail is that they are still locked up 23 hours out of every 24," said David Avery, supervisor of the psychiatric nurses and trainees. "If we could get them outside, just to get a breath of fresh air, I think it would be really good for them."

Compounding the difficulties faced by the staff and mentally ill inmates is the fact that, when the regular cellblocks are full, ordinary prisoners are housed in Southeast 3, too.

"Those [regular inmates] don't understand that some of these here have mental problems and they give them a hard time," Norman Moore, a mental health technician, said.

In a nearby cell, a 25-year-old awaiting trial on auto theft charges -- and also waiting for mental evaluation -- sat on his bed after shooting a few baskets in a tiny gym at one corner of the cellblock.

"They come in here and take advantage of us," he said. "They call us 'nuts' and things like that. Sometimes they'll push us around. There's no way they should be here."

Under Judge Bryant's order, 21 additional staff members must be added to Southeast 3 within the next 60 days. That figure includes 10 mental health technicians, eight corrections officers, and three psychatric nurses.

According to the facility's superintendent, George E. Holland, when the three trainees complete their orientation, five mental health technicians will be on hand, five short of the judge's order. One new psychiatric nurse has been hired, but no additional corrections officers have been placed there yet, he said.

For the corrections department and the other city agencies involved, the judge's ruling presents a difficult problem. The agencies have been ordered to cut their budgets and staffs because of the city's multi-million-dollar budget deficit.

"We'd rather not run a mental health unit at the jail," said Holland. "We're in a bind. But this is where the city keeps sending them [the mentally ill inmates] so we have no choice."

"We want to expedite them so they stay here as short a time as possible," said Dr. Henry Edwards, a city government psychiatrist. "In the past, there's been a lack of understanding about special problems these people pose, but things are changing."

According to Moore, some of those past problems were caused by corrections officers who were insensitive to the problems of mentally ill prisoners.

"The staff we have now is great, they give us a lot of support," he said. "But we've had to have some officers transferred out in the past because they've harrassed the inmates here -- calling them names, things like that."

At first glance, the inmates of Southeast 3 seem indistinguishable from the prison population in general: they wear the same prison clothes, eat the same food, and watch the same television programs.

But a closer look revels differences. Some inmates' clothes are torn or they wear no shoes. Their heads bob and they peer at visitors distractedly. Others talk to themselves or speak incoherently.

When meals are served, the inmates in Southeast 3 eat in their cells rather than in the main dining room when the rest of the prisoners eat.

"To me," said nurse supervisor Avery, "that's ridiculous. They can't even sit down to a meal together."

In one rap session yesterday designed to give the inmates a chance to leave their cells, visit with other inmates, and talk to technicians about whatever comes to mind, the most frequent complaint was not enough food or medicine. But the inmates' minds sometimes wandered far afield.

One 22-year-old man, his eyes soft and glassy, sat on a couch with four others, his palms pressed together and his head rocking from side to side as if to ease the words from his lips.

"Gotta keep my mental-physical body in shape," he was saying. "Gotta do that."

"You've improved tremendously," said Moore. "We might transfer you [out of Southeast 3] in a couple of weeks if you keep doing well. Do you like yourself better now?"

"Yeah, but when I get some milk [at meals] they only give me half a glass of milk, and when I go back they fill it up," he answered. "If they fill it up the first time I wouldn't have to come back."

The inmate sitting next to him laughed. In the background, a loudspeaker announced: "Recreation and shower, recreation and shower. One hour."

"We were kind of glad to see what happened in the court," Moore said later, referring to Bryant's order. "We need all the help we can get."