Sherry Ilene Windt, the 18-year-old girl accused of stabbing her prominent mother to death in their posh Bethesda apartment, will face murder charges in juvenile court instead of being tried as an adult, a Montgomery County Circuit Court judge ruled yesterday.

The decision by Judge H. Ralph Miller makes it likely that Windt will be released from custody by the time she is 21, if not before, regardless of the outcome of an eventual trial.

The decision also ensures that she will remain in a Baltimore psychiatric treatment center staffed by experts in the obscure variety of mental illness her doctors say she suffers from. In the 20 months since she was first examined, her case has become well-known in psychiatric circles around the country.

Windt was first charged with the murder 20 months ago, a few hours after police were summoned to her apartment and discovered the body of her mother, Marjorie S. Windt, an advertising and public relations director for Garfinckel's department store.

She had told family friends, whom she summoned to her apartment in Bethesda's Kenwood House immediately after the killing, that her mother had committed suicide.

Since she was first charged with the murder in October, there has been a long series of pyschiatric examinations and court hearings, during which psychiatrists and attorneys on all sides of the case have agreed that Windt suffers from some form of mental illness.

In dramatic testimony four months after the murder, Dr. Reginald S. Lourie, a senior psychiatric consultant at the National Institutes of Health in Bethesda, described Miss Windt as a deeply disturbed teen-ager with three distinct personalities.

Other psychiatrists who have examned her more recently have shied away from this interpretation of her illness.

However, all the doctors involved with Windt's case have noted her tendency to retreat into "dissociative states," mentally withdrawing from the world around her when under emotional stress.

Dr. Lourie testified last fall that Miss Windt was in just such a dissociative state when her mother was stabbed to death in October, 1975, and most probably did not consciously realize what was happening.

Lourie had said at an earlier hearing that Windt has blocked any conscious memory of the night of the murder, but other psychiatrists have been more skeptical about this amnesia. One team of Boston doctors compared it with "a fantasy of what amnesia might be thought to be."

Windt has been receiving treatment in the Baltimore-based Institute of Psychiatry and Human Behavior since March, when the county's branch of state juvenile court ruled that she qualified for public financial assistance. The cost of the institute's care is $177 a day.

Lourie returned to court yesterday to testify that Windt is "essentially in midstream of the treatment program set up for her," but that it might be six months or a year before she would be mentally strong enough to stand trial and hear detailed testimony about her mother's murder.

Trial as an adult on criminal charges, he said "would be detrimental to her treatment program . . . The potentials of facing a murder trial are inevitably foremost in an individual's mind and . . . provide a pattern of uncertainty which adds to the difficulties of . . . treatment."

As a defendant in adult court, Windt faces the possibility of a first-degree murder conviction and a long prison sentence. In addition, without the aid of juvenile court funds, treatment of the Baltimore center would be impossible. State psychiatric hospitals have said they don't have the expertise to properly handle her case.

In juvenile court, defense attorney Walter H. Madden explained after yesterday's hearing, Windt would avoid being regarded as a criminal defendant. She would be treated instead as a mentally disturbed girl in need of rehabilitation.

Juvenile court's jurisdiction over Windt however, extends only until she reaches the age of 21. After that, the state has no authority to detain her unless a psychiatrist indicates she is a danger to herself or society, and moves to have her committed to a psychiatric institution.

Judge Miller referred to rh progress Windt has made in the Baltimore center yesterday as he made his ruling. "In substance I can simply say there are no services available for this person on this court level. The only services available to her are on a juvenile court level."