Life looked pretty good for Dutee Chand last July.
Having become the first Indian sprinter to reach a final at a global athletics event in 2013, the 18-year-old was already the national champion at 100m and 200m, and an Asian Games bronze medallist.
Such was the excitement about her potential that the Sports Authority of India's director general Jiji Thomson described her as a "sure shot Olympic medallist" of the future, and a place in a final on her Commonwealth Games debut looked within her reach.
But then, less than a fortnight before the opening ceremony in Glasgow, she "failed" a test that had nothing to do with fitness, form or even doping, and was dramatically withdrawn from the national team.
Like South African 800m sensation Caster Semenya before her, Chand discovered - in bold newsprint - that her natural levels of the hormone testosterone were normally only found in men. It did not take long before reporters were outside her parents' humble home asking them and her six siblings if she was a boy or a girl.
|Dutee Chand's fast lane to controversy|
|The third of seven children to a weaver couple from the state of Odisha, Dutee is born on 3 February 1996|
|Becomes Indian national under-18 champion for 100m when she clocks 11.8 seconds in 2012|
|Wins a 200m bronze at 2013 Asian Games and is first Indian to reach a global sprint final at the World Youths, coming sixth in 11.62 seconds|
|Claims 100/200m double at Asian Junior Athletics Championships, prompting the Athletics Federation of India to ask for a gender test in July|
|Wins a case in July 2015 overturning her ban on competing|
She has now been cleared to race by a landmark ruling questioning the validity of so-called gender tests around naturally high testosterone levels in female athletes.
The Court of Arbitration for Sport (Cas) has suspended the International Association of Athletics Federations' "hyperandrogenism" rules for two years. The rules will be scrapped if the International Association of Athletics Federations (IAAF) cannot provide new evidence supporting them.
However, Chand's career has been on hold for a year, leading to her missing both the Commonwealth Games and Asian Games after she refused to subject herself to the "corrective" treatment (hormone suppression therapy and sometimes even genital surgery) prescribed by the IAAF, International Olympic Committee (IOC) and other leading sports bodies.
"I am who I am," said Chand with a mixture of defiance and dismay at the time.
Instead of the sprinter she has spent years training to be, she became the focus of a challenge to sport's rules on gender, a cause celebre and evidence in a scientific debate about testosterone.
A history of suspicion
Concerns about men masquerading as women to win medals have been around for almost as long as women have been allowed to play sport, which is surprising given how rare it is. In fact, the last case most people can agree on is German high jumper Dora/Heinrich Ratjen. He nearly won a bronze medal at the 1936 Olympics.
Undeterred by the unlikelihood of a man successfully passing himself off as a woman, the IOC started comprehensive "gender verification" testing in 1968.
Initially, this was done by asking female athletes to drop their underwear, but eventually a less humiliating method was found: checking swabs of cheek tissue for chromosomes, women being XX, men XY.
Unfortunately, Mother Nature is not as black-and-white as your typical blazer would like his competitions to be, and it turns out there are a dozen different conditions that would once have been lumped under "hermaphrodite", but are now referred to by the less pejorative term of intersex, or disorders of sexual development.
Sport first cottoned on to this when Spanish hurdler Maria Jose Martinez-Patino was told in 1985 that she was an XY "man", but refused to quit or feign injury (as it is widely believed many had before) and spent the next three years fighting ignorance and ridicule to line up alongside women again.
She got there in the end, proving her Y chromosomes were the product of a rare genetic syndrome. She was also able to show that her condition meant she was insensitive to testosterone: it was in her blood, but it was no good to her.
Sadly, Martinez-Patino's most competitive years were behind her. It is not known what happened to the 13 women who "failed" gender tests at Olympics between 1972 and 1984.
But sport seemed to have learned something, though, mainly that it did not know enough about these complicated issues, and by the end of the 1990s gender verification was shelved, apart from in cases of extreme suspicion.
And then Semenya burst onto the scene.
A junior champion in 2008, the muscular teenager took seven seconds off her personal best for 800m over the next nine months, breaking the South African record and setting a world-leading time in the process. The IAAF felt "obliged to investigate", if only to rule out doping.
Hours before the start of the 800m final at the 2009 World Athletics Championships, a race Semenya would win by a huge margin, it was leaked that the sport's governing body had also asked for a gender test.
After Semenya's crushing win at the 2009 Worlds, a Russian rival sniped, "just look at her".
A young girl with a rare condition, and an even rarer talent, was subjected to a medical examination by media.
Semenya, now 24, returned to racing in 2010, and won silver medals at the 2011 Worlds and 2012 Olympics. But she has never run as fast as she did as an 18-year-old.
Bruce Kidd, the 1962 Commonwealth champion in the imperial version of the 10,000m, the six miles, has spent the last half century as a leading academic in the field of physical and health education. The Canadian is also a self-confessed Olympian "of the old school", a champion of sport's ability to unite.
"What a remarkable story Semenya should have been," said Kidd.
"Wouldn't it have been better if the authorities had raised her hand as a great new champion? Instead they hit the moral panic button.
"There has been a long current in modern sport that there must be something wrong with strong women. In the last 20 years it has become a kind of biological racism."
The hyperandrogenism solution
Semenya's case provoked Olympic levels of hand-wringing.
Ashamed at the leaks and lack of scientific rigour, but stung by the reaction to Semenya's physique from some quarters, the IAAF asked an expert working group to come up with a plan for women with "excessive androgenic hormones", or hyperandrogenism.
Androgenic hormones are any natural or synthetic substance that control the development of male characteristics - everything from the formation of testes, to male pattern baldness - with the best known being testosterone.
There is some disagreement over the normal spectrum of testosterone levels for men and women in general, but everybody agrees that typically there is a gap that emerges between the sexes during puberty.
As we have seen, though, there are some women with conditions that give them masculine amounts of testosterone, which the IAAF's working group, in conjunction with the IOC's Medical Commission, decided was anything above the bottom of the male range, 10 nanomoles per litre (nmol/L) of blood.
In April 2011, the new rules came into force. From this moment on, a confidential investigation could be made into any athlete where there were "reasonable grounds". This could be a complaint from a rival, or as a result of an anomaly in a drugs test.
The process would be handled by experts, and "an effective therapeutic strategy" would be offered to any athlete found to have elevated levels of androgen.
Part of this investigation would include finding out if the athlete is benefiting from the testosterone. As was seen in the Martinez-Patino case, androgen insensitivity syndrome (AIS) means those elevated levels of the hormone can give a false picture of what is actually happening.
But while all this is being established, the athletes are ineligible to compete. Sounds reasonable… doesn't it?
The testosterone divide
Peter Sonksen is a professor of endocrinology (the study of hormones) at St Thomas' Hospital in London. It was his research for the IOC that eventually led to the development of an anti-doping test for Human Growth Hormone, but he is far from impressed with its work on testosterone.
"They have got it completely wrong with this idiotic rule," Sonksen told me.
"This rule is unfair, gross and unscientific. It is clear discrimination."
Sonksen's main objection to the 10 nmol/L threshold is that the research he did for his HGH study found 16% of his male athletes had lower than expected testosterone, whereas 13% of his female athletes had high levels of testosterone "with complete overlap between the sexes".
In other words, the gap that exists for testosterone between men and women in the general population does not exist among elite athletes.
This research has been leapt upon by a growing body of campaigners who question the premise that testosterone is a significant factor in any discussions about differences between the sexes' athletic performances.
For them, men's greater height, leaner body mass, narrower hips and higher counts of oxygen-carrying red blood cells are all more persuasive than testosterone.
But this is where we enter disputed territory, and a number of experts reacted angrily to what they saw as the misuse of Sonksen's HGH data. For them, there is little doubt of testosterone's impact, although most admit it is part of the mix, as opposed to being the only ingredient.
An arbitrary line
David Epstein is an award-winning writer for the US magazine Sports Illustrated, but he is perhaps better known as the author of "The Sports Gene", a myth-debunking look at "nature versus nurture".
The book details the many physical differences between men and women, including testosterone, which, when you add them all up, explain why unisex sport is a non-starter for most athletic pursuits. As he explains, elite men's running times are about 11% faster than women's, with even bigger differences in jumping and throwing.
|Small genetic differences, a gulf in performance|
|Event||Men's record||Women's record|
|100m||9.58 seconds||10.49 secs|
|800m||1 minute 40.91 secs||1min 53.28 secs|
|10,000m||26 mins 17.53 secs||29 mins 31.78 secs|
|Marathon||2 hours, 2 mins 57 secs||2 hrs 15 mins 25 secs|
|*Men's javelin - 800g/2.6m-2.7m.||Women's javelin - 600g/2.2m-2.3m.|
"For lots of good reasons, we have decided to have a class of athletes who aren't men," Epstein explained.
"But biological sex is not binary. That means whichever line you draw between men and women it is going to be arbitrary."
For now, Epstein agrees with the IAAF's experts that testosterone is probably "the best line we can draw", although he would prefer it if those experts at least admitted they were making an educated guess.
Joanna Harper is a medical physicist based in Oregon who could run two-hour-23-minute marathons as "a young man", but is now an age-group national champion as "an old lady".
As part of her sex change in 2004, she had therapy to suppress her testosterone levels. For her, there is no real argument about testosterone's effect.
"Women's sport is like a testosterone-handicap event," Harper told me.
"But you cannot have women's equality without women's sport, so you have a dilemma with no perfect solution."
There are two things that everybody does agree on: the women in question deserve to be treated with sensitivity and in confidence, and any consent they give to treatment must be informed.
A 2013 report revealed that four female athletes from "developing countries" had recently come to France for hormone therapy and extensive genital surgery. These cases were dealt with anonymously, and as far as anybody knows they are still competing.
But confirmation that young women are being operated on to comply with sport's rules on what "normal" female genitalia should look like has provoked outrage. Are male athletes subjected to the same scrutiny?
The details of Chand's condition have not been published or leaked, thankfully, but it is believed she was offered hormone therapy and "feminising" surgery.
It is ironic then that her failure to tick the "anonymity box" on her test form saved Chand from being rushed into medical procedures a probably traumatised teenager cannot be expected to understand. The media attention she has received has been intrusive at times, but it also alerted intersex campaigners to her fate.
The first person to come to Chand's aid was Dr Payoshni Mitra, a researcher on gender issues, and she helped galvanise opinion behind taking Chand's case to the Court of Arbitration for Sport.
"We were able to convince (the Sports Authority of India) that these rules are unethical and need to be abolished," said Mitra. "Institutionalised genital mutilation is just scary."
Chand's challenge was filed at CAS last October, with the SAI paying the bill. Her supporters hoped to get her reinstated immediately and the IAAF rules ripped up within six months. An online "Let Dutee Run" campaign got 5,646 signatures and the Indian media massed behind her.
In the end it was late July 2015 when Chand won her case and was allowed to run once more, with the IAAF "hyperandrogenism" rules suspended for two years pending further investigation.
It is impossible to research Chand's story without developing huge sympathy for the position she found herself in. Her life was turned upside down.
It is also clear that elite sport has always been about unfair advantages, be they Usain Bolt's long legs, Michael Phelps's out-of-proportion wingspan, or Sir Bradley Wiggins's cardiovascular system. Sport is not fair.
But if women's sport is to have meaning there must be some boundaries. And if testosterone is so irrelevant, how do we explain the fact that many of the best performances ever achieved by women came during an era when they were pumped full of it as part of an ideological struggle between East and West?
There are no easy answers here.
As Harper, with her special insight into testosterone's effect, puts it: "A level playing field is probably impossible to ever achieve, but a more level playing field is worth striving for."
This feature was first published in October 2014 and updated in the wake of Dutee Chand being cleared to race on 27 July 2015.