These days Christine Taylor probably thinks twice before confiding in medical personnel. In 2010, when Taylor was 22 and pregnant, she fell down a flight of stairs and sought treatment at an Iowa hospital. During her physical exam she confided to hospital staff that she felt ambivalent about being pregnant. Her husband had recently abandoned her and her other two children, leaving her without family or friends in Iowa. Struggling and without support, Taylor’s feelings were understandable, but if she felt relief for having shared them it wouldn’t last long.

Although the fall did not appear to harm the fetus hospital workers alerted the police to Taylor’s admission. She was questioned, arrested, and spent two days in jail while her young children were left alone. Prosecutors initially considered charging her with attempted feticide, defined as an intentional effort to terminate pregnancy after the end of the second trimester, but backed off when they discovered that she hadn’t passed the six-month mark.

While this case may seem like an outlier, it is actually representative of an alarming trend—doctors and medical personnel collaborating with police and prosecutors in the criminalization of pregnant women and mothers. That same year, 2010, also saw the more highly publicized arrest of Bei Bei Shuai, an Indiana woman, for murder and attempted feticide after hospital personnel, who had treated her for a suicide attempt, contacted the authorities after the death of her premature daughter, who was delivered seven weeks early.

As a legal scholar specializing in health care law I’ve spent much of my career looking at the ways in which American law [mis]treats mothers and pregnant women in the name of protecting children. Now, whether driven by their own biases, fear of malpractice suits, or a lingering paternalism, doctors and other health professionals have increasingly become conduits to law enforcement.

While the laws that prompt medical personnel to pick up the phone to the police may be neutral in their language their application is far from even-handed. Women of color and poor women are significantly more likely to come under suspicion from their care providers than their whiter and wealthier peers. They are particularly vulnerable to prosecution and legal intervention for drug use, even though white women use drugs at the same rate as women of color.

In one of the most notorious cases, a nurse at Charleston City Hospital, whose maternity facility served mainly poor women of color in South Carolina, worked with local district attorney Charles Condon to devise a covert program to test pregnant women’s urine for drug use. Under this policy, all positive drug tests were turned over to the police and local prosecutors. This went on for over a decade before the Supreme Court ordered it ended in 2001 in Ferguson v. City of Charleston, S.C.

Halfway across the country in Wisconsin a pregnant Alicia Beltran made headlines in 2013 when she was involuntarily committed after she confided prior drug use to a physician’s assistant from whom she was seeking prenatal care. Beltran, who was 12 weeks pregnant, acknowledged her previous dependence on Percocet, a prescription painkiller, but stated that she had weaned herself off it by using another drug, Suboxone. The physician’s assistant recommended that she continue the use of Suboxone, but she declined to do so because she was already drug free, a claim that her drug tests supported. Two weeks later Beltran was arrested, handcuffed, and held in jail before receiving a hearing in front of a family court commissioner. She was denied a lawyer to represent her, despite the fact that the district attorney’s office was representing the local child protective services agency and a separate guardian had been appointed to represent the fetus. The family court commissioner ordered Beltran to be confined against her will in an inpatient drug treatment facility two hours from her home. She remained there for 78 days and lost her job as a result.

To understand why care providers are increasingly acting like arms of the police we must grasp how tendencies in both medicine and law have converged to make the doctor-patient relationship—which should be one of the safest and most inviolable—fraught with danger for pregnant women and mothers.

Driven by a not-so-veiled agenda to reverse Roe v. Wade, prosecutors and legislators have made great strides in granting legal rights to the fetus, which have overridden those of mothers. Across the United States pregnant women have been prosecuted for homicide based on scant evidence for everything from refusing to have a cesarean section, delivering a baby at home without a physician’s assistance, and using illegal drugs. More than 30 states make the use of alcohol or illegal drugs while pregnant grounds for civil commitment. In addition, a pregnant woman’s right to accept or deny medical care is increasingly overridden in favor of fetal “rights.” In more than half the states a woman’s advance medical directive is unenforceable while she is pregnant.

A watershed event in the mission to establish personhood for fetuses occurred in 1999. That’s when another South Carolina district attorney successfully prosecuted Regina McKnight for murder. McKnight, a young, homeless, and mentally impaired African-American woman delivered a stillborn baby after using cocaine during her pregnancy. While the science on the effect of illegal drugs, such as cocaine or heroin, on a developing fetus is far from conclusive, the prosecutors pounced on this to make a case that McKnight was guilty of murder because of behavior she engaged in while pregnant. She was sentenced to 20 years in prison, and the conviction was affirmed by the South Carolina Supreme Court. McKnight signaled a dramatic shift in the criminal landscape and zealous prosecutors took full measure of it. Charles Condon, who by then was state attorney general, crowed: “Today, South Carolina’s unborn children have a much better chance at a long, happy life than they did yesterday.”

This uptick in prosecution and the conflation of a child with a fetus has not gone unnoticed by the medical profession, which is required to report any suspicion of child abuse to the authorities even if it means breaching patient confidentiality. As the fetus has gained rights under the law, pregnant women have increasingly become viewed as incubators whose autonomy is suspended or at least minimized throughout pregnancy. Many doctors today appear to believe that the fetus, not the mother, is the primary patient.

As much as we might like to believe that the biases, both conscious and unconscious, that pervade society evaporate in medical settings, the truth is that doctors and care providers harbor the very same ones that persist in the public at large. This is why they are more likely to perceive risk in certain patients and not others. Research has shown that women of color are no more likely to use drugs than white women, yet their doctors are more likely to perceive their behavior as a risk to the fetus that demands legal intervention. The majority of women who have been referred to law enforcement by care providers have been women of color.

Add to that a lingering tendency toward medical paternalism (“doctor knows best”), which is particularly prevalent in those exchanges that cross racial, gender, and class lines and you have the makings of a collaboration between medicine and law enforcement that is worrying for anyone who cares about civil liberties and the rights of women.

This trend not only tramples on the rights of women to bodily autonomy, but it also undermines their ability to speak candidly with their health providers and, ultimately, to receive necessary care and treatment. One thing that has not arisen alongside this willingness of care providers to turn in women to the authorities is an improvement in children’s health. That would require broad-based social and political change that would replace punitive measures with universally accessible programs and policies that support children’s health. Alicia Beltran and Christine Taylor had the right to expect confidentiality, compassion, and appropriate medical treatment from the care providers without fear of legal reprisal. So does every other woman.