This is not the story of the day inmates started running the Texas prisons, but of the day they stopped.

All hell has broken loose.

For decades, the keepers of the peace inside Texas' legendarily harsh prisons were recruited by the wardens from the ranks of the inmates; the bigger and tougher, the better.

Their job was to keep their cell blocks clean and safe, and if that meant resorting to some muscle, well then, the wardens knew when to look the other way.

Late last year, under orders of a federal judge, the Texas Department of Corrections did away with its controversial "building tender" enforcement system. Prison officials here say they have been battling anarchy ever since.

Twelve inmates have been murdered so far in 1984 in the 35,000-prisoner system, equaling the previous record for a full year. Inmate stabbings and assaults on guards are running at twice last year's rate; racial gangs inside the prisons are moving into the enforcement and protection business, and wardens openly admit they are not sure how or when they will be able to restore control.

"It's just the law of the streets in there, going by size and intimidation," said David Myers, warden of the Eastham Unit, one of 26 state prisons. Under the old system, he said, "at least we picked who the inmate enforcers would be. The difference now is that they're picking themselves. And they're no good at it."

"We had one prison where we found actual written protection policies," said corrections board member Harry Whittington. " The charge was $49 a month for complete security, $29 a month for cuts and bruises, that sort of thing."

This outbreak of violence is new to Texas prisons. Despite chronic overcrowding and living conditions generally considered the most austere in the nation, there has not been a prison riot in modern times here. Escapes are rare, and reported rates of violence, though suspect in many quarters, have always been low.

The corrections department built this record spending just $6,951 per inmate last year, lowest in the nation. California, the only state prison system with more inmates than Texas, spent $19,339 per inmate in 1983. The national average was $16,245, according to the Criminal Justice Institute.

Defenders of the building tender system credit it with maintaining order on the cheap. They say that, allowing for holidays and vacations, it takes five guards to provide the 24-hour-a-day cell block coverage that could be had from one unpaid building tender.

Morever, they say tenders were never more than glorified janitors and institutionalized informers. Appointing a building tender, they add, was often little more than a psychological ploy aimed at controlling the tender's behavior, much the way a third-grade bully might be brought into line by a teacher giving him responsiblity for monitoring the halls.

Critics say the system was never so benign. Building tenders were dictators, they say, who built empires, brutalized rivals and used their protected status to extort everything from cigarettes to money to sex from weaker inmates.

"Anytime, in a prison setting, you give one inmate power over another, you're asking for trouble," said Albert Race Sample, an ex-convict who has written about his 17 years in Texas prisons. "The tenders used to be much more feared than the guards."

U.S. District Court Judge William Justice, who has been overseeing Texas prisons since he ruled in 1981 that they were violating inmates' constitutional rights in a variety of ways, sided with the critics. But when he ordered the tender system dismantled, he also warned, "If TDC the corrections department permits a vacuum of authority to replace the building tenders , the results will be tragic."

On its face, it would seem that there need not be a vacuum. Other prison systems rely on inmates for custodial work and unofficial snitching, but they get by without making them ersatz guards.

Why has Texas found the transition so difficult? Some, like Sample, suspect the guards and wardens may be intentionally holding back, perhaps hoping for a return to the old ways.

"They had it made in the shade under the old system," Sample said. "They could sit around all night cracking peanuts and reading Playboy. It's just eating their lunch, just killing them, that they have to go out and patrol the cell blocks now.

"They could make it work if they wanted to," he added. "They got the guns."

But most other outside observers do not think there is any intentional holding back, at least not any more. This spring, the corrections department went out of state to hire a new prison director, Ray Procunier, 61, a 35-year corrections veteran. He said his first order of business would be to remove any lingering "ain't-it-awful" pockets of resistance from the staff.

He has appointed six new wardens, shifted some 100 supervisors and generally picked up good reviews from his board, his staff and inmate groups.

"The morale among the staff is as good as it can be," said Procunier, who has run prison systems in California, New Mexico, Utah and Virginia. "They are trying to make it work."

The system is not working, Procunier said, in part because he is still in the process hiring the 1,500 guards Judge Justice said would be needed to replace tenders. Procunier is under court orders to reach by January the one-guard-to-six-inmates ratio that is the national norm.

But something deeper may be at work. Time served in Texas prisons has long been considered the hardest in this country. It may be that under its repressive living conditions, it takes something as rugged as intimidation by inmate-guards to keep the peace.

"The TDC is probably the best example of slavery remaining in the country," Arnold Pontesso, former director of corrections in Oklahoma, said several years ago.

This is a system where inmates are still roused in predawn darkness to spend the day picking cotton by hand, and where they swelter at night in two-person cells in 100-plus-degree heat, with no access to outdoor recreation yards. Procunier said he was "flabbergasted" to discover that Texas had no outdoor yards. Under Justice's prodding, several are being built.

It is a system that prohibits visitors from physical contact of any kind with inmates, does not pay inmates for the factory and farming work they do, keeps 93 percent of the prisoners in maximum security settings and, until just a few years ago, forbade talking in dining areas.

"Every state has its own cultural attitudes toward prisons," Procunier said. "People here take a real pride in their austerity toward people who are locked up. The attitude toward felons has always been put them to work, make them pay their way, they have no rights."

Warden Myers summed up this tough view of prison life when he complained of Justice's ending the bread-and-water diet the system used to impose on inmates in solitary confinement: "He turned it into a two-week vacation, with room service."

In such a setting, keeping order is rough. "It is a system with all sticks and no carrots, and they just don't have enough flexibility," said Charles Sullivan, director of CURE, a state prison reform group.

The flexibility is further eroded among the 7,500 inmates who have been sentenced in the past six years to serve flat time, that is, absolute minimum jail sentences, with no time off for good behavior. "Good time is the most useful tool a prison administrator in Texas has," Procunier said. "Taking it away, no question, makes our life more difficult. Most people live on some light at the end of the tunnel. What do you tell a 19-year-old kid who is looking at a 20-year minimum?"

On top of that, the inmate population here is fairly evenly divided among blacks (43 percent), whites (37 percent) and Hispanics (20 percent). In nine of the 12 killings this year, the victim and suspect were of a different race, and racial tensions are said to be worsening.

Procunier has taken some first steps toward trying to reestablish control. A weapons search this summer yielded 1,300 "shanks," a prison term for homemade knives. Metal silverware has been replaced with plastic and metal detectors are going into some of the units.

Beyond that, Procunier said in an interview that he wants to segregate the most violence-prone inmates into six units, and to create a minimum security prison for better behaved inmates. He wants to allow contact visits. He wants to review, and perhaps deemphasize, the agricultural program.

"Let's face it, there ain't a whole lot of jobs in the free world hand-picking cotton," Sample noted.

In short, Procunier said, he wants to make Texas prisons more like prisons in the rest of the country. Not everyone here agrees. "If you work a guy all day, he's going to be less trouble," said T.L. Austin, former chairman of the corrections department board, defending the agriculture program. "And anytime you teach him to work, no matter what the skill, you're doing him a great favor."

Austin takes a dim view of other reforms as well.

"The public doesn't want to spend money for prisons," he said. "If you can't spend money, you need to go with the sort of unpaid help you get with the building tender system. What the do-gooders never understood is either the warden picks a building tender, or the prisoners do. It worked a whole lot better when the warden did."

Procunier knows there is no going back. But he is not sure what going foward will bring. "The last three months," he said, "have been tougher than my first 35 years in corrections, put together. I am not sure I am going to be able to pull this off."