Swimming's world governing body FINA has voted to restrict the participation of transgender athletes in elite women's competitions and create a working group to establish an "open" category for them in some events, as part of its new policy.
Transgender rights have become a major talking point, as sports try to balance inclusivity without creating an unfair advantage.
FINA's decision - the strictest by any Olympic sports body - was made during its extraordinary general congress, after members heard a report from a transgender taskforce, comprising leading medical, legal and sports figures.
The new eligibility policy for FINA competitions states male-to-female transgender athletes are eligible to compete only if "they can establish to FINA's comfortable satisfaction that they have not experienced any part of male puberty beyond Tanner Stage 2 (of puberty) or before age 12, whichever is later".
The policy was passed with a roughly 71 percent majority, after it was put to the members of 152 national federations with voting rights, who had gathered for the congress at Budapest, Hungary.
"We have to protect the rights of our athletes to compete, but we also have to protect competitive fairness at our events, especially the women's category at FINA competitions," said FINA president Husain Al-Musallam.
"FINA will always welcome every athlete. The creation of an open category will mean that everybody has the opportunity to compete at an elite level.
"This has not been done before, so FINA will need to lead the way. I want all athletes to feel included in being able to develop ideas during this process."
The new FINA policy also opens up eligibility to those who have "complete androgen insensitivity and therefore could not experience male puberty".
Swimmers who have had "male puberty suppressed beginning at Tanner Stage 2 or before age 12, whichever is later, and they have since continuously maintained their testosterone levels in serum (or plasma) below 2.5 nmol/L" are also allowed to compete in women's races.
Female-to-male transgender athletes (transgender men) are fully eligible to compete in men's swimming competitions.
Advocates for transgender inclusion argue that not enough studies have yet been done on the impact of transition on physical performance and that elite athletes are often physical outliers in any case.
The International Olympic Committee issued a 'framework' on the issue, leaving eligibility decisions up to individual sports bodies, but adding that "until evidence determines otherwise, athletes should not be deemed to have an unfair or disproportionate competitive advantage due to their sex variations, physical appearance and/or transgender status".
Athlete Ally - an advocacy group for LGBTQI+ people in sport - has condemned FINA's decision.
"FINA's new eligibility criteria for transgender athletes and athletes with intersex variations is discriminatory, harmful, unscientific, and not in line with the 2021 IOC principles," it tweeted. "If we truly want to protect women's sports, we must include all women."
Former swimmer Sharron Davies, who won Olympic silver at Moscow 1980 and has been a vocal campaigner for a more restrictive policy, welcomed the decision.
"I can't tell you how proud I am of my sport, FINA and the FINA president for doing the science, asking the athletes/coaches and standing up for fair sport for females. Swimming will always welcome everyone, no matter how you identify, but fairness is the cornerstone of sport."