In California, new inmates are flooding the prisons at the rate of 200 a week and the state has embarked on the largest prison construction program in the nation. But in 1991, when it completes $2.3 billion worth of building, California still expects to have 20,000 more inmates than prison beds.

In Tennessee, where one frustrated sheriff handcuffed 12 inmates to a prison-camp fence last November in a futile attempt to force the state to take them, state officials are just beginning to stagger out from under a prison crisis that began 11 years ago.

In Alabama, where in 1976 a federal judge called the swollen prisons "barbaric" and slammed their gates shut to additional inmates, the court order has been lifted after massive construction and reform programs that took nearly a decade to complete.

Thirty-five states are under court orders to end overcrowding in their prisons, while the number of inmates in the nation is at an all-time high -- more than 500,000 last year, double the figure a decade before. In 1975, governments at all levels spent nearly $1.5 billion on corrections. In 1983, the bill was more than $10 billion, a seven-fold increase.

The District of Columbia's longstanding prison crisis erupted in flames nearly two weeks ago when inmates at Lorton Reformatory in southeastern Fairfax County set fire to 14 buildings, leaving four in ruins and injuring 32 persons.

The web of court orders capping the bulging D.C. prison populations and the skyrocketing corrections budget that never seems enough to contain the problem are not unique to the District.

As in other jurisdictions, the prison dilemma here is partly a result of a phenomenon that one official calls public "schizophrenia" about crime and punishment. "The public wants to put people in prison," said Raymond Brown, director of the National Institute of Corrections, "but it doesn't want to pay the price."

The crisis in the nation's capital mirrors the problems elsewhere. Yet it has gone on far longer, and the District has received far more assistance from the federal government -- although at a high political price.

Mayor Marion Barry proclaims that the city "has done more than most" to solve the crisis; American Civil Liberties Union attorney Alvin Bronstein asserts that "the District is more inept . . . than any jurisdiction" with such problems. The reality, as in many complex situations, lies somewhere in between.

The legal attack on conditions at the old D.C. Jail began in 1971, earlier than those challenging prison conditions in most other jurisdictions. And the 15-year fight to resolve the problem has been one of the longest in the nation.

Federal facilities now hold about 2,400 District inmates -- more than double the 970 held by the federal government for the 50 state prison systems combined. Congress, moreover, has approved a $30 million special appropriation to build a new D.C. prison.

The exceptional federal assistance flows largely from the unique relationship between the nation's capital and the federal government, but that relationship has drawbacks that make solutions, difficult everywhere, even more elusive here.

Nearly every state that solved its prison problems has done so through consensus among often feuding political players in the criminal justice system, according to Gerald Kaufman, who heads the National Jail and Prison Overcrowding Project.

This includes legislators who pass the sentencing laws, prosecutors who take defendants to trial, judges who sentence them and the state officials who approve prison budgets.

The District, however, is the only jurisdiction in the nation where control of the criminal justice system is split. The criminal judges are not part of the local government, the local prosecutor is appointed by the president and Congress ultimately controls the budget.

"If you think of it in terms of Civics 101, it sounds crazy," said Kaufman.

Kaufman and other prison experts also assert that another key to solving prison problems is matching the basic sentencing structure to resources, and finding alternatives to prison if that is necessary. "To build prisons is fine," said Kaufman, "but you can't pass tough sentencing laws and not build . . . or you'll end up exactly where many states have, in crisis."

Orville Pung, the corrections commissioner in Minnesota, one of the few states that has avoided crisis by doing years ago what experts such as Kaufman suggest, said that even a slight change in the sentencing laws can send the prison population soaring.

"It would be as if you said, 'Let's make high school five years rather than four' and did nothing else, no new teachers, no new schools," said Pung. "You can imagine what would happen . . . . There would be kids sitting on window sills. We have done that in corrections."

Still, many states have come through their prison crises.

Few had as far to progress as Alabama, where in 1975 prisoners were sleeping on mattresses atop urinals and some were punished in a tiny, windowless cell known as the "doghouse."

The antiquated system was 54 percent over capacity in 1976, when a federal judge found "rampant violence" and "a jungle atmosphere" and blamed overcrowding for all of the system's "other ills."

Almost nothing was done for three years, said John L. Carroll, who represented the inmates in court. But in 1979, when the judge was ready to wrest control of the prisons from the state, the newly elected governor, Democrat Forrest H. (Fob) James Jr., admitted that conditions were "indefensible" and began a massive building program.

Just as important, said Carroll, was the fact that James changed the state's attitude. "It was no longer, 'Let's fight tooth and nail against the court order,' " said Carroll. "It was, 'We've got to comply.' "

Still, by the time George C. Wallace returned to the governor's office in 1983, state inmates were overflowing the county jails. Corrections commissioner Fred Smith designed a program for accelerated release of certain inmates; he sent them home under stringent supervision at night, and by day they worked to pay for victim restitution and the cost of their own supervision.

The public reacted to such alternatives as it has in most places. Smith recalled that "Lock your doors, Freddie is letting another rapist out" was a constant refrain.

But the state sold the program with a public relations push that included film spots at local theaters and speeches that Smith still gives to local groups.

"We use the work ethic," said Smith. "We say, 'Work 'em till their tongues hang out. Make 'em pay their victims back and pay you, the taxpayer.' " Smith and others say it has worked.

Prisons in Alabama are far better today than a decade ago, said Bronstein, who heads the ACLU's National Prison Project, which has taken Alabama, the District and more than 20 other states to court.

In 1975, the same year that a federal judge decreed that conditions at the old D.C. Jail were unconstitutional, lawyers in Tennessee were heading for court.

Judges issued orders capping the prison population, and a massive buildup began. Still, Kaufman recalls that the speaker of the Tennessee House told him about a year ago: "In the last eight years, we've built six new prisons. It is a bottomless pit."

Tennessee's experiences held other similarities with the District's. In 1982, for instance, District voters overwhelmingly approved a tough mandatory minimum sentencing law. Tennesseeans had passed their own "get-tough" sentencing bill three years earlier -- an action that was about to produce tough consequences for the state.

"They passed laws mirroring political trends and did nothing to fund them," said Nashville lawyer Gordon Bonnyman, who represented inmates in the prison case. "The chickens came home to roost in 1984."

By 1985, riots had rocked four crowded state prisons and a federal judge lost his patience. Tennessee officials had shown "reckless indifference" to their duties, the judge declared, and halted virtually all admissions to the state's system.

Only then did the Democratic-controlled legislature and the Republican Gov. Lamar Alexander join to find solutions that began to work, Bonnyman said. It had been 11 years since the court case was filed.

One of the fastest turnarounds came in Hawaii. In 1984, the ACLU filed a suit challenging conditions at the state's major prison. In 1985, officials signed a court consent decree, agreeing to end overcrowding and reform the system in a state whose prison population had doubled since 1981, according to Hawaii's Corrections Administrator Ted Sakai. The state legislature promptly approved $8.5 million to implement the decree.

"We told them the lawmakers we could be held in contempt of court . . . . We could be fined, a special master could be named to run the system," said Sakai. "We told them none of those alternatives are acceptable to us as a state."

The District's response has been vastly different.

In 1975, U.S. District Court Judge William B. Bryant ordered District officials to end overcrowding at the old D.C. Jail within 10 days. There were about 3,100 inmates housed in D.C. facilities at the time. In the years since, a new jail has opened and the District has added 2,000 prison beds at a cost of $28.5 million.

Last week, the prison population stood at nearly 8,500 inmates, including 2,400 in federal facilities. Bryant still held sway over the system and District officials were scrambling to recover from the latest crisis at Lorton.

The July 10 fires at the Occoquan I and II facilities at Lorton sent sparks flying far beyond the institution's walls. U.S. Attorney Joseph E. diGenova accused the District of "playing Russian roulette" with its residents' safety by failing to quickly build a new prison.

The mayor, in turn, blamed the Lorton uprising on news reports highlighting a consultant's predictions of violence and reminded the public that the District shared its prison woes with scores of other places in the nation.

Hardy Rauch, an American Correctional Association official who has watched the situation unfold, listened with interest.

"Just because you're not alone, does not mean you shouldn't do something," Rauch said last week in an interview. "It is time for all of us to stop . . . pointing our fingers and sharing the guilt. It is time to start sharing solutions."