She wasn’t especially tall. Her testosterone levels weren’t unusually high for a woman. She was externally entirely female. But in the mid-1980s, when her chromosome results came back as XY instead of the “normal” XX for a woman, the Spanish national team ousted hurdler María José Martínez-Patiño. She was ejected from the Olympic residence and deserted by her teammates, friends, and boyfriend. She lost her records and medals because of a genetic mutation that wasn’t proven to give her any competitive advantage.

People like Martínez-Patiño have been ill-served by rules that draw a hard line between the sexes. In the U.S., the Trump administration looks set to make things worse. According to a memo leaked to The New York Times in October, the U.S. Department of Health and Human Services is trying to set up a legal binary definition of sex, establishing each person “as male or female based on immutable biological traits identifiable by or before birth.” But our bodies are more complicated than that.

An increasing recognition of this complexity by researchers and the public has affirmed that gender sits on a spectrum: People are more and more willing to acknowledge the reality of nonbinary and transgender identities, and to support those who courageously fight for their rights in everything from all-gender bathrooms to anti-gender-discrimination laws. But underlying all of this is the perception that no matter the gender a person identifies as, they have an underlying sex they were born with. This represents a fundamental misunderstanding about the nature of biological sex. Science keeps showing us that sex also doesn’t fit in a binary, whether it be determined by genitals, chromosomes, hormones, or bones (which are the subject of my research).

The perception of a hard-and-fast separation between the sexes started to disintegrate during the second wave of feminism in the 1970s and 1980s. In the decades that followed, we learned that about 1.7 percent of babies are born with intersex traits; that behavior, body shape, and size overlap significantly between the sexes, and both men and women have the same circulating hormones; and that there is nothing inherently female about the X chromosome. Biological realities are complicated. People living their lives as women can be found, even late in life, to be XXY or XY.

Science keeps showing us that sex also doesn’t fit in a binary, whether it be determined by genitals, chromosomes, hormones, or bones.

Skeletal studies, the field that I work in as a doctoral student in anthropology, and the history of this field show how our society’s assumptions about sex can lead to profound mistakes, and how acknowledging that things are not really as binary as they may seem can help to resolve those errors. Trump and his advisers should take note.

If you’ve ever watched the TV series Bones, you’ve heard Temperance “Bones” Brennan, the show’s protagonist and star forensic anthropologist, call out to her colleagues whether the skeleton she’s analyzing is male or female. That’s because sex distinctions are very helpful to know for missing persons and archaeological sites alike. But just how easy is it to make this determination?

In the early 1900s, the U.S.-based anthropologist Aleš Hrdlička helped to found the modern study of human bones. He served as the first curator of physical anthropology at the U.S. National Museum (now the Smithsonian Institution). The skeletons Hrdlička studied were categorized as either male or female, seemingly without exception. He was not the only one who thought sex fell into two distinct categories that did not overlap. Scientists Fred P. Thieme and William J. Schull of the University of Michigan wrote about sexing a skeleton in 1957: “Sex, unlike most phenotypic features in which man varies, is not continuously variable but is expressed in a clear bimodal distribution.” Identifying the sex of a skeleton relies most heavily on the pelvis (for example, females more often have a distinctive bony groove), but it also depends on the general assumption that larger or more marked traits are male, including larger skulls and sizable rough places where muscle attaches to bone. This idea of a distinct binary system for skeletal sex pervaded—and warped—the historical records for decades.

Two pelvises with drastically exaggerated differences—a man’s shown on the left and a woman’s on the right (identified in Lithuanian)—illustrate how sex was estimated skeletally in the early 1900s. Henry Gray/Wikimedia Commons

In 1972, Kenneth Weiss, now a professor emeritus of anthropology and genetics at Pennsylvania State University, noticed that there were about 12 percent more male skeletons than females reported at archaeological sites. This seemed odd, since the proportion of men to women should have been about half and half. The reason for the bias, Weiss concluded, was an “irresistible temptation in many cases to call doubtful specimens male.” For example, a particularly tall, narrow-hipped woman might be mistakenly cataloged as a man. After Weiss published about this male bias, research practices began to change. In 1993, 21 years later, the aptly named Karen Bone, then a master’s student at the University of Tennessee, Knoxville, examined a more recent dataset and found that the bias had declined: The ratio of male to female skeletons had balanced out. In part that might be because of better, more accurate ways of sexing skeletons. But also, when I went back through the papers Bone cited, I noticed there were more individuals categorized as “indeterminate” after 1972 and basically none prior.

Allowing skeletons to remain unsexed, or “indeterminate,” reflects an acceptance of the variability and overlap between the sexes. It does not necessarily mean that the skeletons classified this way are, in fact, neither male nor female, but it does mean that there is no clear or easy way to tell the difference. As science and social change in the 1970s and 1980s revealed that sex is complicated, the category of “indeterminate sex” individuals in skeletal research became more common and improved scientific accuracy.

For generations, the false perception that there are two distinct biological sexes has had many negative indirect effects. It has muddied historical archaeological records, and it has caused humiliation for athletes around the globe who are closely scrutinized. In the mid-1940s, female Olympic athletes went through a degrading process of having their genitals inspected to receive “femininity certificates.” This was replaced by chromosome testing in the late 1960s and subsequently, hormone testing. But instead of rooting out imposters, these tests just illustrated the complexity of human sex.

It might be more convenient for the U.S. federal government to have a binary system for determining legal sex; many U.S. laws and customs are built on this assumption. But just because it’s a convenient system of classification doesn’t mean it’s right. Some countries, such as Canada, and some states in the U.S., including Oregon, now allow people to declare a nonbinary gender identity on their driver’s license or other identification documents. In a world where it is apparently debatable whether anti-discrimination laws apply to sex or gender, it is a step in the wrong direction to be writing either one into law as a strictly binary phenomenon.

The famous cases of strong, athletic, and audacious female athletes who have had their careers derailed by the Olympic “gender tests” exemplify how misguided it is to classify sex or gender as binary. These women are, like all of us, part of a sex spectrum, not a sex binary. The more we as a society recognize that, the less we will humiliate and unnecessarily scrutinize people—and the less discriminatory our world will be.

This article was republished at The Atlantic and Slate.