In a red brick courthouse about 15 miles from the ocean, the police and district attorney here are making it their business to determine once and for all whether Amy Elizabeth Gannage was murdered by a midwife or, as her parents put it, was called home to God."

Amy Gannage was pronounced dead in a San Francisco hospital five days after her birth. She was born just outside San Luis Obispo, in the bedroom of her parents' home, attended by a midwife, Marianne Doshi, 31. The baby's father, who watched, said a knot had formed in the umbilical cord. The coroner said asphxiation was the cause of death.

For the deeply Christian Robert and Christine Gannage, the death of their third child was an act of the Lord, awful but inevitable. For county medical and legal officials watching the nationwide "natural birth" movement with increasing dismay, Amy's death was a senseless waste that they insist would never have happened if the baby had been born in a hospital.

They had anticipated just such a case. On July 7, almost a month after Amy's death, police arrested Marianne Doshi at her San Luis Obispo home and charged her with felony murder.

With that arrest, the Gannage family's private tragedy was transformed - very much against their wishes - into what appears to be the first legal action of its kind against a midwife.

California, like many other states, allows midwives to deliver babies only if the midwives are registered nurses, have been certified by the American College of Nurse-Midwives, and are operating under the supervision of a physician.

Doshi is none of these. She is a lay midwife, unlicensed by the state, and state law says it is a misdemeanor - practicing medicine without a license - for a lay midwife to deliver babies. When a misdemeanor results in a death, the charge can be changed to murder.

And as Doshi called it a witch hunt, as medical officials called it a potential lifesaver long overdue, as the bewildered parents fight off mounting anger at lawyers and reporters who will not let them alone with their grief, the case around Amy Gannage raised the terrible questions that make such violent controversies out of abortion, euthanasia and private refusal of medical treatment.

Where does the state's responsibility to protect life begin? Do parents have the right to let faith guide their choice of birth proceudre? Is there a separate right - the right of the newborn baby - that supersedes that of the woman who carries the child?

The safety of midwifery and home births has been hotly disputed for many years, with home birth advocates and obstetricians opposed to the practice producting conflicting statistics to support their positions.

The Amercian College of Obstericians and Gynecologists says babies born at home are at least twice as likely to die as babies born inhospitals. Home delivery is not necessarily synonymous with lay midwifery, but in this country obsteticians and nurse-midwives are generally so reluctant to deliver at home that the vast majority of home births are believed to be conducted by lay midwives.

And lay midwife groups and their supporters say their studies show statistically that home births, which are widely accepted insome countries, such as Holland, with infant mortality rates lower than that of the United States, can be safer than hospital deliveries if the pregnancies are monitored for possible complications.

But that is not really the issue for the Gannage family.The issue is Amy Gannage's death.

"We went with the knowledge of what might happen," Gannage said quietly recently, explaining the decision to arrange for a midwife. "We believed that His will would be done. We trusted Him fully. We walked by faith and not by sight. If you could see things fully, and know that nothing could go wrong, where is your faith?"

"A parent has every right" to favor the idea of home birth, county health drector Dr. Howard Mitchell said, in a separate interview. "It's all very well for the parent to have a nice, warm, friendly delivery. But who's looking after the child?"

Obstetricians can ofen detect umbilical knots at the onset of labor, by monitoring the infant's heartbeat, and then sometimes use a Cesarean section or quick forceps delivery to save the baby's life. "It's a correctable problem," Mitchell insisted. "It's not God's will."

Marianne Doshi's only comment about the case has been a prepared statement delivered shortly after her arrest. "My arrest is not solely aimed at me, but is an attempt to intimidate parents who might choose to deliver their children at home," the statement read.

Khail and Faith Ann, the Gannages' two other children, were born in a hospital. The Gannages are not particularly hostile to doctors (Mrs. Gannage saw an obstetrician three times during this last pregnancy), but like most parents who have chosen some alternative to the hospital, they were soured by the delivery room atmosphere.

Mrs. Gannage remembered small indignities, the things that made it frightening for her - the way they took the babies away, the test on Khail's foot that left a scar on his heel, the nurse who got impatient at Mrs. Gannage's questions and snapped, "Oh, be quiet. You'll be all right."

So they decided to have their third child at home. They met Marianne Doshi through a natural childbirth class she was teaching, and Gannage said her apparend experience and knowledge impressed them. He said he had no idea unlicensed midwifery was illegal.

Mrs. Gannage wetn into labor the morning of June 3. Amy was born an hour later, with the knot in her umbilical cord apparently tight enough to cut off her blood and air supply. She was pale, Gannage said, and was not breathing. Doshi administered mouth-tomouth resuscitation whild Gannage called for paramedics, he said.

The paramedics were able to induce a heartbeat, and the baby was rushed to the hospital - first by ambulance to a hospital in San Luis Obispo, and then by air to a San Francisco hospital, where doctors said Amy would receive better treatment.

Amy was pronounced dead on June 8 without ever having breathed on her own. A week later, as Gannage remembered it, the investigators came to their home, inquiring about the birth. He asked them to drop the case. He asked them about their own religious beliefs. He was adamant about not prosecuting Doshi.

"There are things we do because of our faith that I don't expect other men to do," Gannage said. "I don't expect people to understand the things that we do - only respect that we have the freedom to do it."

In the case of this birth, California law does not give them that freedom. In 1975, after refusing for 26 years to issue licenses to midwives, the legislature authorized the release fo new licenses. But the only midwives eligible now are registered nurses specially trained in a hospital setting - "the most expensive training model in the world" said Michael Krisman, a health official with the state consumer affairs department, which is urging a loosening of the regulations.

Midwifery laws differ from state to state. According to a 1977 report by the Department of Health, Education and Welfare, 19 states and territories allow licenses to be issued to lay midwives.

Most of the rest require nursing degrees and certification by the American College of Nurse-Midwives, which estimates that about 1,800 nurse-midwives are working throughout the country.

Shari Daniels, an El Paso, Tex, lay midwife who helped found the National Midwives Association, believes there may be three times that many lay midwives in practice nationwide - many of them unlicensed, like those in California, and breaking the law every time they deliver a baby.

Doshi was arraigned in San Luis Obispo Municipal Court last month and charged with murder and a felony count of practicing medicine without a license. Her trial was set for Dec. 4. The Gannages were subpoenaed and, under protest, talked to a grand jury last month about the death of their baby.

They also answered the letter they received recently from the city and county of San Francisco, a brisk little letter from the chief medical examiner. "We find that we still have the case [body] of Amy Elizabeth Gannage," the letter read. "Please go to a funeral home and make arrangements." It was stamped with an official county seal.