In 1984, a New Jersey woman named Mary Beth Whitehead agreed to be a surrogate mother for a childless couple, William and Betsy Stern.

Whitehead’s own eggs were used and after the girl, Baby M, was born, Whitehead made the emotional decision that she could not give up the baby. She ignored the contract she had signed and refused the $10,000 surrogacy payment.

The New Jersey supreme court invalidated the contract, but the Sterns were still granted full custody of the girl. Whitehead received limited visitation rights.

The case had far-reaching consequences, not the least of which was the outlawing of commercial surrogacy in New York and New Jersey. The only surrogacy allowed in the Empire State is what’s known as “compassionate surrogacy,” where the woman gestating the baby receives no financial compensation.

Mary Beth Whitehead

But 30 years after Baby M, it’s time to reconsider such a sweeping ban — New York should make paid surrogacy legal.

Surrogacy today differs dramatically — medically, morally and legally. Today, most couples and surrogates opt for new-and-improved “gestational surrogacy,” where the sperm, egg and uterus come from three separate people. The surrogate becomes pregnant through IVF, and the embryo she gestates is not created from her own egg. She has no biological connection to the baby; legally and genetically, the baby is never her child.

Intended parents, surrogates and lawyers all prefer this surrogacy 2.0, because it clearly delineates the legal parents and grants the surrogate psychological separation from the baby she has helped create. Exploitation of gestational surrogates is rare; surrogates work voluntarily, for a mix of altruistic and financial reasons, and both clients and clinics carefully screen for surrogates who are healthy, mentally grounded and fully aware of the complexity of making someone else’s baby dreams come true.

One of the most logical sets of surrogacy regulations, surprisingly, is found in India. Laws there are straightforward and pointedly designed to prevent exploitation of women, destruction of female fetuses and blackmail of clients.

Only gestational surrogacy is allowed. The intended parents, on the other hand, must have a genetic link to the baby — either through sperm or egg — to avoid a eugenics marketplace where parents seek to engineer a barbaric ideal of physical or genetic superiority.

A surrogate who miscarries cannot work as a surrogate again; there are limits to the number of babies a surrogate can carry and how many times she can be pregnant. Creating a baby via surrogacy is a voluntary, contracted medical procedure with rational rules and guidelines, distinctly different from traditional motherhood.

New York could, like India, lead the way in regulating paid surrogacy with fair, rational laws that protect donors, surrogates, intended parents and babies, backed up by health-insurance coverage that treats infertility as the disease doctors consider it to be.

Making paid surrogacy legal also would make it more affordable. Right now, only the wealthiest New Yorkers can afford the $100,000 or more it costs to pay surrogates in states where the arrangement is legal, such as Connecticut or Maryland.

Surrogate mother Mary Beth Whitehead-Gould, center, and her husband, Dean Gould, arrive for the start of a hearing on her visitation rights with her 2-year-old daughter, known as Baby M, in Hackensack, N.J., Monday, March 29, 1988.AP/Miker Derer

This is not to trivialize how challenging — morally, legally, financially and psychologically — having a baby via surrogate can be for everyone involved. Gestational surrogacy’s transmogrification of pregnancy and parenthood shakes the human race’s centuries-old definition of motherhood.

But we often forget how complicated and emotionally messy parenthood often is, even when achieved the “old-fashioned way.” One of the few upsides of infertility — and multifaceted, expensive solutions like surrogacy — is that the disease forces parents and surrogates to confront this complexity of parenthood long before a baby is born.

Infertility is unfair, a cruel, crippling, usually random disease that strikes 10% to 12% of the population without warning. One of the surprises of infertility, for both men and women, is that there is no test for it, so you rarely know you are infertile until you try, and fail, to conceive a baby.

It is made even more unfair when the state outlaws one of your options. Surrogacy should be made legal because hopeful parents, dedicated doctors and empathetic surrogates all believe in one simple truth: that everyone who wants a baby should be able to have a baby.

Leslie Morgan Steiner’s most recent book is “The Baby Chase: How Surrogacy is Transforming the American Family” (St. Martin’s Press)