IT HAD TO HAPPEN. A surrogate mother has reneged, and now a court in California is trying to determine what to do. The woman, a mother of three, was artificially inseminated with the sperm of a married New Yorker whose wife couldn't bear children. The plan was that the California mother would carry the child, give birth to it and then turn the baby over to the New York couple for adoption. But shortly after the surrogate mother discovered she was pregnant, she decided to keep the baby and now all parties involved are in court.All parties, that is, except the baby who is still in utero, but due any day.

The immediate issue before the court is who gets to keep the baby, and the judge has said he will decide in "the best interests of the child," now the guiding principle in settling child custody disputes in many stages. The New York couple is asking for custody of the child once it is born, that they be allowed to name it and that it be placed in foster care until the court reaches a decision. The New York couple has paid the woman's medical expenses, but has not paid her any other fee.

While the concept of "best interests of the child" works well as a principle in custody disputes between divorcing parents, here is a case in which the court should distinguish between donating sperm and being a father. Clearly, the mother has made a greater investment of herself in the child's development so far, and clearly she has a greater role in the outcome of the court decision. She has donated her body, nine months of her life and become part of the emotional bond that develops between a mother and child during pregnancy. If the New York couple loses custody, they simply will not be getting a child they never had. Should the baby be taken from the mother, she would be losing a child.

At the risk of being labeled a fuddy-duddy in such matters, I will confess that the first time I even saw a couple and a surrogate mother on a television talk show describing the marvels of their arrangement, I felt I was watching something downright freaky.

The surrogate mother in that case was a young, unmarried woman who had never had children and who was living with the couple while carrying the child. The couple's argument for the arrangement was that the baby would be at least half theirs genetically. The mother's argument for the arrangement, as I recall, was that she was having the wonderful experience of having a child at the same time she was able to help a childless couple. Wait, I thought, until she goes into labor.

That was four or five years ago, and the popularity of surrogate mothers for infertile couples has grown by the hundreds.Some women charge fees -- which to me sounds a lot like baby selling -- while others don't. Some couples know the mother, others don't. And the whole business has been a boon to lawyers who have found yet another way of making money, and to talk show hosts who have found yet another titillating warp in human behavior.

Surrogate motherhood -- which is, in fact, motherhood in which you give up your baby -- came as a trendy response to the shortage of adoptable children. It is a testament to the lengths people will go in order to have children, and it is also a testament to the lengths we have gone in confusing what is essentially right with what is essentially wrong.

There used to be a time when a woman would not think of voluntarily getting pregnant, bearing a child and then giving it up. There used to be a time when a married man who got a woman other than his wife pregnant had big trouble on his hands. But now that we've found a way to take sex out of pregnancy, and if some woman wants to act like a brood mare and turn her body into a baby factory, well we reason tolerantly, that's her business.

The California case is telling us that this business may be convenient and practical, but that doesn't make it right. You can take sex out of pregnancy, but you can't take emotions out of parenthood. So the California woman wants to keep the baby she has been carrying and the New York couple says she's putting them through an emotional hell. The two biological parents of the child aren't married to each other; someone wants to be a mother to this chid who has virtually no claim to motherhood, and the mother of the child is being called a surrogate mother when in fact she is the real mother.

Artificial insemination has helped many couples have children when the husband is infertile by impregnating the wife with sperm from an anonymous donor. But to impregnate a woman who will "incubate" the child for nine months, or "grow it," as one surrogate mother called the process, is a practice that can exist only by repturing the emotional bonds between mother and infant. It is a triumph of biology over humanity, and that doesn't move any of us up. As the California woman has discovered, it goes against everything that motherhood is all about. It's one way to produce a baby, but it's no way to become a parent.