The person carrying the flag for South Africa at Friday’s opening ceremonies might be one of the most-famous athletes on the planet. But her notoriety has little to do with her talent on the track; nor does it stem from her hardscrabble personal story. Instead, this girl—who went from a village where few have running water to reigning world champion—is best known for the fact that three years ago, the whole world was openly speculating about what, exactly, was going on under her running shorts.

Though she has since been cleared for competition, the subject of Caster Semenya’s gender is still pretty much all anyone talks about when they talk about the powerhouse runner. In 2009, after shaving eight seconds off of her personal best during the run-up to the World Athletic Championships in Berlin, the rumors that had long swirled around the now 21-year old athlete reached a fever pitch. In the weeks that followed, Semenya made headlines around the world—under some of the most unenviable circumstances imaginable. As one of her competitors put it bluntly: “For me, she’s not a woman. She is a man.”

On the day before the Berlin event, the International Association of Athletics Federations—the umbrella organization that runs all international athletic competitions outside of the Olympics—announced that Semenya was undergoing gender-verification testing, a weeks-long process that had started in South Africa and would continue in Berlin. Semenya, it was later reported, had been told she was being tested for doping. But in spite of the humiliating public reveal, her victory the following day was as definite as it was defiant. Her nearest competition crossed the finish line a full bus-length behind her. She won gold, beat her own personal best, and became the world champion in the 800 meters. It should have been the best day of her life. Instead, after the race, she retreated from cameras and microphones, avoided all interviews, and, ultimately, disappeared—for eleven months. Banned from competition by the IAAF, Semenya underwent a slew of further tests before being cleared for competition as a woman. She also sparked the IAAF and the International Olympic Committee to confront, yet again, an issue they’d repeatedly attempted to wash their hands of.

Semenya, of course, is far from the first competitor to face this kind of scrutiny. Female athletes, especially the talented ones, have been accused of not really being female for almost as long as they’ve been allowed to compete. Early in her career, Serena Williams—who just won her fifth Wimbledon and who will be trying for her third Olympic gold in London—was called a “shemale” and a transsexual. So was tennis great Martina Navratilova, who played in the 2004 Athens games. And Brittney Griner, who this year led Baylor University’s women’s basketball team to an undefeated season and an NCAA championship and earlier this month was named, along with LeBron James, athlete of the year at the ESPN ESPY Awards has been so dogged by rumors that she’s actually a man that her coach once publicly pleaded for the speculation to cease.

Such accusations go back at least half a century. The IOC adopted its first set of gender tests in the 1960s, with “nude parades” that were exactly what they sound like: female competitors made to walk naked before a panel of judges. But as the IOC later realized, what’s on the outside doesn’t always match what’s on the inside, so the committee moved on to chromosome testing. Once it was shown that women can have a single X chromosome (just as men can have two of them) that was abandoned as well. Then came SRY gene detection (the gene that triggers male sex determination), but after the Atlanta games, in which 8 women tested positive for it, and all were cleared for competition, this method, too, was deemed insufficient. A decade ago, the committee decided to chuck the testing altogether. But in the wake of Semenya’s case, and the international scrutiny it prompted, the IOC announced that it would try, once again, to devise a way to decisively determine what makes a woman a woman.

The committee’s medical commission assembled a group of two-dozen experts. They gathered in Lausanne, Switzerland, to debate the various aspects of sex characteristics and the merits of various methods of testing. Late this past June, the committee announced the result of those meetings: that the determining factor making men men and women women—and the source of what was deemed an unfair competitive edge—lies in naturally-occurring levels of testosterone. The testing, which will be administered on a case-by-case basis rather than across the board, as earlier incarnations were, will result in the ban of any female athlete deemed to have an unfair advantage because of high testosterone levels. Unlike the IAAF, it doesn’t elaborate on interventions or treatments. But for female athletes who want to compete, the option is not off the table. This could mean anything from surgical interventions (removing internal, essentially dormant testes) to pharmaceutical ones (hormone replacement therapies).

Semenya, her coach, and sports officials have been cryptic about the results of her tests and the treatments she might be undergoing—but details of the exams have leaked out nonetheless. According to a story published in Australia’s Daily Telegraph, Semenya’s body has both male and female characteristics—she’s externally female, and internally male, essentially— and produces far more testosterone than the average woman. The track and field manager at the University of Pretoria’s High Performance Centre, where Semenya trains, recently confirmed that she has submitted to an unspecified treatment in order to compete in the London games. Meanwhile, speculation about a softer Semanya is already circulating—The Atlantic Wire recently published two side-by-side pictures of Semanya with crude red arrows pointing at her jawline (slightly less masculine than before?) and waist (does it seem nipped in?).

The visual comparisons are hardly conclusive—neither are her race times. This shouldn’t come as a surprise, according to critics of testosterone testing, who say that there’s been precious little research done on how the hormone actually affects female athletes. “These policies are based more on folklore than precise science,” says socio-medical scientist Rebecca Jordan-Young, the author of Brain Storm: the Flaws in the Science of Sex Differences and an author of a paper that criticized testosterone testing recently published by the American Journal of Bioethics. (The paper was released prior to the IOC’s official announcement and was based—as was our interview—on the policies already adopted by the IAAF, and those the researchers expected the IOC to adopt as well.) Along with a co-author, Katrina Karkazis of Stanford’s Center for Biomedical Ethics, she cites the fact that women who are unable to process androgens—including testosterone—tend to excel in sports, not fail at them. Yes, testosterone can be used as a performance enhancer on an individual basis, but if the hormone were truly helpful across the board, they say, women with that condition “would be under-represented, not over-represented.”

But what most troubles the researchers is the fact that female athletes found to have excessive levels of testosterone might have to submit to medical intervention to lower those levels if they want to compete—even when medical intervention might otherwise be unnecessary. “These women might not experience anything wrong with their bodies,” says Jordan-Young, noting that athletes of this caliber are among the healthiest people on the planet. “The treatments can raise issues all on their own. These are not benign drugs.” According to studies, patients treated via hormone replacement therapy are more likely to develop breast cancer, ovarian cancer, strokes, and heart attacks. Adds Karkazis, “They’ve said this is for the health of the athletes. There’s a phony benevolence there.”

To be clear, what the IOC committee is looking for is levels of naturally-occurring testosterone that the body produces on its own, without help from injected hormones. It’s simple to test for synthetic versions of testosterone, and not even the IOC claims this is analogous to testing for doping. Having abnormally high levels of natural testosterone, critics say, is more akin to having an oversized heart, like Lance Armstrong, or double-jointed ankles, like Michael Phelps. It’s genetic, biological, and it may or may not confer an advantage. “The question is, do you let a woman who by all other measures is a woman but who has testosterone compete and say, ‘Well, this is a variation of womanhood that has made her a champion in a certain field and has given her a world record,’ or are you going to say, ‘This is outside true ‘Woman’’?” says Anne Fausto-Sterling, a professor of Biology and Gender Identity at Brown University. “For me, there’s no right way to do that.”

Even supporters of the new policy acknowledge that it is falls far short of perfect. “It is a social-imposed categorization which sports authorities have always struggled to comply with,” says Dr. Eric Vilain, a professor of human genetics at UCLA who advised the IOC in Lausanne. The reason so many methods have been adopted and then abandoned is because there is no single indicator that can be used to definitively distinguishes between the sexes—not chromosomes, nor hormones, nor secondary characteristics, nor external appearance. “The reality is it’s absolutely never going to be perfect.”

What the IOC has struggled with all these years exposes something that many of us might find difficult to process: between M and F exists a tremendous swath of gray. Exact numbers are hard to pin down, but by some estimates, at least one in every 2,000 babies is born intersex, and still more are diagnosed as teenagers or adults. As Fausto-Sterling says, “The reason sports federations can’t get this right is because there is no right.”

In recent years, public attitudes towards gender roles and identity have begun to loosen considerably. A Denver father of six recently made international headlines after he somewhat cheerfully told a local paper that doctors had discovered ovaries in the place of testes during a routine treatment for kidney stones. Transgendered people now compete on “Dancing with the Stars,” and in the Miss America pageant. Four countries have third-gender options on their passport forms. And this spring, Sweden introduced a gender-neutral pronoun.

When it comes to the transgendered, the IOC saw the writing on the wall almost a decade ago. In 2004, it issued a set of guidelines called the Stockholm Consensus, which stipulates that trans athletes may compete as long as surgeries and hormone treatments have been completed and the individual’s new sex is legally recognized. But in the upper echelons of professional sports, the idea that there might be something other than male or female, something neither here nor there, isn’t so easy to accommodate.

“In what other institutional setting in society could ever you have a sex test and not only legitimize it but present it as if it was a necessary policy?” asks Ian Richie, a professor of Health Sciences at Canada’s Brock University. “To test somebody’s sex, to have them prove that they are what they are in terms of their sex, is in many countries completely unethical, contrary to human rights, in some cases unconstitutional. But in the context of sport it’s seen as an inevitable thing we have to do. Sport the only place that could happen, because sport is based on the idea that men are men and women are women and that’s it.”

Semenya may be carrying her country’s flag in London, but there’s no denying that her journey to the world’s stage was at times an agonizing one. In a 2011 British television documentary called Too Fast to be a Woman, Semenya spoke of sinking into a deep depression after being subjected to the tests, and even considered quitting athletics altogether. The Indian middle-distance runner Santhi Soundarajan’s silver medal in the 800 meters, won at the Doha Asian Games in 2006, was revoked after she failed a gender test of her own. She was banned from sports participation by the Athletics Federation of India, and this week the Times of India reported that she is now working in a brick kiln, earning roughly $3 per day.

It all highlights a cruel injustice: the policy—and the testing, treatment, and humiliation that can come with it—only applies to female athletes. Men who excel at, say, ice dancing or synchronized swimming, where success has more to do with grace and rhythm than brute strength or speed, simply aren’t questioned in the same way women are. In 2010, after two French-Canadian sports commentators snickered over the flamboyant skating champion Johnny Weir and suggested that he should compete with the women, they were immediately and vociferously condemned for what was widely perceived as homophobic, despicable language. (This was, keep in mind, precisely the moment that Semenya was living in virtual exile after the subject of her gender had made international news.) Similarly, there is no upper—or lower, for that matter—limit to the amount of testosterone their bodies naturally produce.

This past winter, Bruce Kidd, a Canadian professor of physical education and health, who competed as a runner in the 1964 Olympics, called on the IOC to abandon not just gender testing, but segregation too. Karkazis and Jordan-Young have called for a similar change, noting that size and strength could, in the future, provide a better basis for groupings than sex alone. Already, male and female athletes compete against one another in all equestrian and sailing events, and in some of the luge, badminton, and tennis ones.

But as Vilain and others admit, eliminating gender segregation altogether could, in practical terms, lead to something that looks nothing like equality. It’s been mere weeks since the fortieth anniversary of Title IX, which ensured that girls had the same access to athletics that their male classmates did. Isn’t there something counter-intuitive about the notion of dismantling women-specific sports in the name of gender equity? Wouldn’t such a move just eliminate women from the competition altogether?

Maybe not. A recent ESPN feature on the future of women in sports called, “You Ain’t Seen Nothing Yet,” argued that “women are not necessarily just getting bigger, they’re also getting better.” Brittney Griner, the basketball superstar who’s six feet, seven inches tall, will be dethroned in no time, the piece said. Sports is, essentially, a numbers game, and in the United States 4.5 million high school boys are on athletic teams, versus just 3.2 million girls. As those numbers level out— as they have consistently since girls were first allowed to play—we can expect to see more athletes with size and talent comparable to hers. “Women are already as good, or better, than men.”

If true, the need for gender testing may be moot soon enough. But that’s probably little consolation for today’s athletes. “The way you were born is the way you were born,” Semenya says in the British documentary. “Nothing can change it. I’ve got a deep voice. I know. I might look tough but what are you going to do? Do you think you can change it? No. If someone was born the way she was born, are you going to blame him or are you going to blame God? Whose fault is that? Nobody’s.”