The Caster Semenya case began acrimoniously and ended the same way. It started with a search for a simple truth yet even in its resolution leaves loose threads and unanswered questions. The final verdict protects the rights of many sportspeople, and leaves other heroes ostracised and exposed.
Throughout it has been a mess of contradictions and conflation. The Court of Arbitration for Sport (Cas) has rejected Semenya's appeal against athletics' governing body's regulations but revealed in its verdict the flaws that may ensure this is a new front rather than the end.
Nobody has truly won. One side has just lost less than the other.
For South African Semenya, Olympic champion over 800m, a private life lived publicly has now brought both an unwanted notoriety and what appears the cruellest of choices: undertake radical hormone therapy, or step away from the sport that has defined her life and taken her from rural poverty to the status of national icon.
The IAAF has its case but not its vindication.
It took three arbitrators more than two months to reach their decision. When they did, only two of them accepted the argument and the policy that came from it: that high testosterone in female athletes confers significant advantages in size, strength and power from puberty onwards, that the rules were "necessary, reasonable and proportionate" to ensure fair competition in women's sport.
Semenya is an easy woman to defend, an inadvertent global cause celebre that few cannot find immense sympathy for.
She is not the only female athlete with differences in sexual development (DSD) in her event, let alone her sport. When she brought her case to Cas, claiming discrimination, her statement was iconoclastic: "I am Mokgadi Caster Semenya. I am a woman and I am fast."
Multiple Wimbledon champion Martina Navratilova summed up the most potent argument in Semenya's favour when she pointed out that the athlete had done nothing wrong.
BANNED FOR DOPING
She hasn't. Semenya was born with her condition, raised as a woman and continues to identify as a woman. Her high levels of testosterone are naturally occurring. She was beaten at the 2012 London Olympics only by a Russian who has now been banned for doping.
Now, if she wishes to compete at September's World Championships in Doha, she will have to take a blood test for her eligibility and then start taking medication within one week.
You would wish that on no-one. Sport is about elite excellence but also about inclusivity. It is about being as good as you can biologically be, about bringing together different nations, creeds and physiques.
The IAAF's near-impossible conflict has been in protecting all those ideals, but also the rights of women who Semenya - and other athletes with DSD - have been not just routinely beating but leaving far in their wake.
Controversy has followed Semenya from the start. She arrived at the 2009 Worlds in Berlin as a muscular, deep-voiced 18-year-old who had improved her 800m personal best by seven seconds in less than nine months, and then ran away from her rivals to take gold by the biggest margin in championship history.
Inside athletics, coaches and athletes have always talked. Was she winning without having to train as hard as her rivals? Could she run a poor tactical race and still come out on top? Did she ever have to push herself to her limits as others did?
"She can run ordinary," said one top distance coach, "and win."
The argument on one side was simple. Men with longer limbs benefit from a significant edge in basketball. Sprinters with a higher proportion of fast-twitch fibres are at an advantage over other men without the same natural speed.
It was also simplistic. Elite basketball is not divided into categories for those of different height. The 100m at the Olympics is not split along lines of muscle fibre.
The spectrum of identity stretches far beyond the binary. At this point, international sporting competition does not reflect that.
At the Olympics you can compete only as a man or a woman. And if 99% of female competitors are significantly disadvantaged against intersex athletes with hyperandrogenism, should they not be protected too?
The IAAF says that most female athletes have testosterone levels in the range of 0.12 to 1.79 nanomoles per litre (nmol/l). DSD athletes are usually in the normal adult male range, from 7.7 to 29.4nmol/l. The International Olympic Committee states 99% of women have testosterone levels less than 3.0nmol/l.
That is not comparable to American swimmer Michael Phelps' much-discussed natural advantages. Most adult males have a wingspan - the distance from fingertip to fingertip with arms outstretched - close to their height. Phelps is 6ft 4in with a wingspan of 6ft 7in.
The IAAF has also not said DSD athletes cannot compete. Under its guidelines they can - in international competitions in any discipline other than track events between 400m and a mile, any non-international events, in the male classification at any competition, at any level, and in any discipline.
If they wish to compete in women's events, they must reduce their testosterone to below 5nmol/l for at least six months in some events.
But athletics' governing body must accept some of the blame for the chaos, because its case was was presented with imperfections and outright mistakes.
Its first pass was suspended by Cas in 2015 for failing to sufficiently quantify the performance advantage gained in women's events by elevated testosterone levels. When it then published a report in 2017 that stated elite women runners with high testosterone were significantly faster those with lower levels, three independent researchers said they found that the performance data used was flawed 17% to 33% of the time.
It is one of the reasons why Semenya is likely to mount a further challenge to the verdict and why athletics - and other global sports - cannot expect to settle back into the old way of doing things.
Wednesday's decision by Cas means the middle-distance events at the World Championships in September will now feel like true races rather than two competitions in one - the first, out front, for DSD runners; the second for the rest.
That is as neat as it gets.
It will not solve the argument that is brewing into a storm around the rights and restrictions surrounding transgender athletes in women's events. Neither will it change the minds of those who see Semenya as a victim rather than accidental biological bully.
Sexual identity is anything but one-dimensional. International sport, set up for a world that is fading from view, does not yet reflect this.
At some point soon, that contradiction will have to be resolved.