In the three years since he left a Maryland state mental hospital, Michael Wayne Allen has learned a lot about the outside world.

Allen, 32, has scouted abandoned houses where he can sleep if the shelters in Montgomery County are full. He knows which trash cans near the Smithsonian Institution contain the best scraps of food discarded by tourists. He has discovered that if he walks very fast, he can sometimes escape the evil demons that he thinks inhabit his body and make him stand on street corners shrieking at strangers.

Christine Muzyk Disher has made her own adjustment to life as a discharged mental patient. Since 1971 she has been hospitalized more than 10 times, once in a condition her psychiatrist characterized as so "grossly insane" that she was "incapable of any normal conversation."

Today Disher, 35, directs a Rockville drop-in center for ex-patients, which she helped start, and persuaded Maryland officials to fund. Last year she got married, and she and her husband are planning to buy a house.

As different as they seem, Allen and Disher have important things in common. In March 1978 both were patients at Springfield Hospital Center in Sykesville, Maryland's largest mental instititution. Both were diagnosed as having chronic schizophrenia, a serious thought and mood disorder characterized by vivid hallucinations. And both left the grounds of the sprawling hospital 60 miles north of Washington as part of a massive shift in social policy known as deinstitutionalization.

For legal, humanitarian and financial reasons, virtually every state during the past two decades has shut down buildings or entire hospitals, discharging patients who had languished for years on back wards and drastically shortening the stays of those who at one time might have remained much longer.

In 1955 there were 559,000 patients in state mental hospitals. Today there are 125,000. This dramatic decline symbolizes a revolution in the philosophy of treating mental illness, a radical change that in recent years has become increasingly controversial. More than any other factor, deinstitutionalization has been blamed for the worsening problem of homelessness. The visible presence of disturbed street people has prompted a reexamination of a policy that critics say has succeeded primarily in returning helpless psychotics to a world where they are unable or unwilling to seek help.

To many, the sight of Michael Allen rooting through garbage and screaming at strangers aptly symbolizes the legacy of deinstitutionalization. Yet he is only part of the story. Christy Disher is also representative of that legacy, her successful struggle a realization of the optimistic vision policy makers had when they began emptying state mental hospitals in the 1960s.

There are others whose experiences are less neatly categorized. Among them are Frank K., 26, hospitalized seven times at Springfield and currently a prisoner in the Montgomery County jail, and Sandy W., 45, discharged from Springfield in December after 27 years and now living in a group home in Rockville. Their families asked that their last names not be published.

For Allen, Disher, Frank and Sandy, leaving Springfield was a crucial step in a long struggle to build a relatively normal life despite the crippling effects of chronic mental illness. Their experiences are representative of those of the 2 million chronically mentally ill Americans for whom deinstitutionalization has been a complicated, unpredictable process shaped by a score of personal, medical and political factors.

An examination of these four cases, based on interviews and confidential medical records each made available to The Washington Post, provides an unusually detailed view of serious mental illness and the methods used to treat it. The four were chosen from more than 40 former Montgomery County patients who were interviewed along with psychiatrists, hospital staff, national, state and county mental health experts and families of the mentally ill to assess the impact of deinstitutionalization on one state hospital and the community it serves. 'The Policy Everybody Loves to Hate'

The failures of deinstitutionalization, the experiences of these former patients demonstrate, are not those of concept but of implementation and unrealistic expectations.

Patients with the most serious and recurrent mental illnesses, chiefly schizophrenia, have been expected to leave the protected confines of remote mental hospitals and, with little help and less money, to make it in urban communities unprepared for their return and unwilling to take them back.

In cases where patients obviously improved, it was not because they were cured -- in fact no cure exists -- or because a specific treatment clearly worked. Making it outside the hospital requires an ephemeral combination of determination, personal courage, timing, family support, community resources and the interest of staff inside and outside the hospital.

Although it is difficult to predict who will successfully adapt to life outside the hospital and why, several factors are critical. Because hospitalization is usually relatively brief -- the average stay at Springfield is 28 days -- and treatment is limited, patients need considerable support upon discharge. Those who failed to make the wrenching transition were not necessarily discharged prematurely or the recipients of inadequate care.

They were, however, expected to reestablish their lives in Montgomery County -- find a place to live, apply for benefits, get a job -- from a rural hospital an hour away. Frightened, with little money and often heavily medicated, released patients are expected to seek social services from agencies that had little contact with the hospital that had treated them. Not surprisingly, many end up on the streets, in jail or back in the hospital.

"The consequences of shoving people out of hospitals without providing community care are so obvious and so visible it's become a national scandal," said Dr. John A. Talbott, president of the 28,000-member American Psychiatric Association. "We failed to differentiate between those people who would be helped and those who would not. But I worry that the response to homelessness is, 'Let's send them all back to the hospital.' "

The premise that treatment in the community is more humane, more therapeutic and less stigmatizing is widely accepted. Because, as in Sandy's case, long hospitalization can result in psychological damage as bad as the illness itself, state hospitals are now generally reserved for those who are dangerous to themselves or others. The central issue is whether treatment in hospitals prepares patients for life in the community and whether the community has prepared for their return by providing supportive programs.

"Deinstitutionalization is the policy everybody loves to hate, but the fact is that many people who left institutions are thriving," said Norman S. Rosenberg, executive director of the Mental Health Law Project, a Washington-based public interest firm. "There's no question that the fantasy of what it could mean has not been carried out, mostly because of a lack of commitment to developing community services."

Maryland moved large numbers of patients out of its mental hospitals a decade later than New York or California, thereby avoiding the worst excesses of dumping vulnerable ex-patients on unprepared communities.

Nevertheless the state's experience illustrates the problems facing even the most well-meaning officials. Treatment at Springfield, regarded as the best of Maryland's big state hospitals, is at times little more than custodial. Some patients are discharged with only the name of a mental health clinic and the address of a shelter.

About 30,000 people have been discharged from Maryland state mental hospitals, but follow-up care and planning are difficult at best because there is no way of determining what happened to them. The primary reason: Maryland's data collection system was designed in 1962.

"Institutions like Springfield continue to be these monster places that symbolize most of all where we banish people," said Maryland Attorney General Stephen H. Sachs, an outspoken critic of the state's mental health system. "You have people coming out of hospitals where all decisions were made for them, who are by definition in the most fragile time of their life, and now they have to set up their lives and deal with all this bureaucracy."

Negotiating a bewildering bureaucracy is only part of the problem. Money has not followed the patients. Maryland spends about 82 percent of its $186 million mental health budget on 12 state hospitals that contain about 2,600 patients, less than 10 percent of the state's population of chronically mentally ill residents.

The result is a severe shortage of programs in the communities where more than 26,000 ex-patients live. There are about 1,000 places in supervised housing programs but at least 6,500 more people who need such services. St. Luke's House Inc., the primary halfway house program in Montgomery County, has a three-year waiting list. Shelters and jails report alarming increases in the numbers of former state hospital patients, many of them young men with serious drug or alcohol problems. Approval of a welfare application in Montgomery County can take up to 45 days, and even for those who qualify, $180 per month does not buy much housing in one of the nation's richest suburbs.

Montgomery County, which has more psychiatrists than any jurisdiction in the country, has been slower than its rural counterparts, notably Frederick County, in developing programs for its 4,000 chronically mentally ill residents, Springfield officials say. Although it operates a sophisticated network of public services, the county's bureaucracy is so complex that it discourages some who most need help from seeking it.

"Montgomery County is a powerful, affluent county, very verbal in its opposition," said Dr. V. Rao Inaganti, head of Springfield's Montgomery County unit. "There are high expectations. In a rural county there are lower expectations" and more community tolerance.

Springfield, which opened in 1896 and lost its accreditation in 1981 because of shortages of skilled staff and decaying buildings, is caught between conflicting demands to improve treatment and reduce the number of patients. Located in Sykesville, a town of 1,712 in Carroll County, the hospital serves the 1.4 million residents of Montgomery, Frederick, Howard and Carroll counties and a section of Baltimore that includes the city's richest and poorest neighborhoods.

Springfield recorded 1,700 admissions last year, although half of its patients have been there longer than a year. More than 550 of those admitted in 1984 were Montgomery County residents, many of whom arrived handcuffed in the back of a police car to await involuntary commitment hearings.

Although half of the hospital's 103 red brick buildings are boarded up, the Montgomery County admissions unit is so overcrowded that seven patients share one room. Sometimes patients sleep in seclusion rooms or in hallways on plastic cushions from day-room sofas. Even though accommodations are best described as spartan, the cost of a year at Springfield is $51,100, nearly double the cost of providing a full range of community services to someone outside the hospital. Four Patients: Lives of Pain

Despite the individual crises that sent Allen, Disher, Frank and Sandy to the hospital, they are typical of Springfield's 900 patients. All four are schizophrenic, a diagnosis shared by half of the hospital's patients. They are from middle-class families who exhausted insurance benefits or savings at private hospitals. Except for Disher, none has a college degree or has held a steady job in years. All except Sandy were born during the postwar baby boom and had breakdowns precipitated by the use of drugs. Two have been arrested on criminal charges. None was able to return home.

When Michael Allen arrived at Springfield three years ago he was 29, unemployed and desperate. He sat bolt upright, staring intensely at the doctor as he confessed that he was contemplating "climbing up a tall building and running off the top." Suicide, he said, seemed the only way to escape the "invisible beings" that had invaded his body years earlier.

Allen told the doctor he had quit a job as a shoe salesman after his customers began to look like demons. Several years earlier, after his marriage ended, he attempted suicide by swallowing 50 aspirin tablets.

He had been hospitalized briefly five times before, twice at Springfield. Although he willingly took medication in the hospital -- rarely when outside -- neither antipsychotic drugs nor therapy had rid him of incessant, tormenting hallucinations. Because his hospitalizations were so brief -- the longest was five weeks -- doctors thought it likely that the right combination of drugs and therapy had not been tried long enough to do much good.

In 1978 Allen had been at Springfield for 20 days. He had been taken there by police after he ran naked out of his parents' house and into a neighbor's because he thought demons were attacking him.

Because he had smoked PCP, doctors diagnosed his problem as "marijuana abuse," not mental illness. He was discharged without medication and given the address of a county mental health clinic. He never showed up.

In 1979 Allen walked most of the 40 miles from Wheaton to Sykesville and pleaded to be readmitted. "The demons were driving me crazy," he recalled. "I didn't want to go to the hospital but I didn't know what else to do."

Doctors diagnosed his condition as paranoid schizophrenia. Twelve days after he was admitted, Allen and another patient ran away while walking the grounds. "The demons were inside Springfield, and I felt everyone was attacking me," he said. "I just couldn't stay there."

In Christy Disher's case, the decision about whether to stay was made for her. On March 13, 1977, police picked her up wandering around Bethesda confused and incoherent, and they drove her to Springfield. Several days later her parents had her committed.

Several weeks earlier, Disher, then 27, the youngest of four children of a retired Army colonel, had been fired from a secretarial job at a private girls' school. During an argument with her parents she had picked up a shovel and smashed the headlights on their new car. She had stopped taking medication after her psychiatrist at Bethesda Naval Hospital, whom she had seen for two years, was transferred out of state.

Her problems surfaced in 1970 while she was studying at the Sorbonne during her junior year in college. Although she had lived overseas before -- her father had been stationed in Germany, Korea and Japan -- she found Paris lonely and depressing. She spent days closeted in her room, brooding and gaining weight.

She came home early and took a lot of amphetamines to lose weight. In 1971 she graduated from Boston College and moved to Manhattan, where she found a job as a secretary to a magazine editor. Her first breakdown occurred weeks later when she started hallucinating.

She recalls her twenties as a numbing round of psychiatric wards, dreary apartments and dead-end jobs. In March 1977, when she was led in handcuffs into Springfield's Lane Building, Disher was returning to a place her family knew only too well. She had been a patient there before.

So had her oldest brother. In 1964 an illness diagnosed as chronic schizophrenia forced him to drop out of college.

Doctors were not sure whether Frank K. was a schizophrenic or a drug addict when he arrived at Springfield in December 1983 from the Montgomery County jail, where he had been a prisoner for six months.

Frank, then 25, was a difficult problem for jail officials. Since the age of 14 he has had Crohn's disease, an irreversible intestinal inflammation that causes chronic diarrhea and can result in fatal dehydration. In jail he displayed little emotion, was very withdrawn and spoke in a monotone, all signs of schizophrenia. Because officials feared that his illnesses and passivity made him an easy mark for other prisoners, he was isolated in a special unit where he repeatedly set small fires.

When he inexplicably stopped speaking, court officials, concerned about his competence, sent him to Springfield for evaluation. They feared that Frank was unable to prepare for his upcoming trial on a charge of selling $160 worth of opium, prescribed to treat his Crohn's disease, to an undercover Maryland state policewoman.

When sheriff's deputies escorted him into the Lane Building, he was greeted by hospital staff who knew him well. Since 1979 he had been a patient there five times and was once admitted weighing only 97 pounds.

For Sandy W., the ride to Springfield had taken place more than two decades earlier, on Jan. 13, 1958.

He had spent more than a year at Johns Hopkins Hospital in Baltimore, deteriorating to the point where he was catatonic, incontinent and unable to feed himself. His parents had him committed to Springfield because they had other children and could no longer afford the expense of a private hospital.

Sandy had been, his father said in admission papers, "a sweet, handsome, shy child, much too well-behaved and eager to please." His parents first noticed that something was terribly wrong when, at the age of 12, he began complaining that customers on his paper route in Bethesda were whispering about him. A series of psychiatrists and private schools had not helped. The last, a Vermont boarding school for disturbed children, sent him home early after his classmates taunted him mercilessly.

At Hopkins he remained on a locked ward for a year. Neither psychotherapy, large doses of Thorazine or 24 electroshock treatments helped.

On the day he was admitted to Springfield, where he would remain until Dec. 12, 1984, a psychiatrist described him as "negativistic, uncooperative and hostile."

"Insight and judgment are very poor," the doctor wrote, "and also the prognosis is very poor.