Swimming will set up an 'open category' to allow transgender athletes to compete as part of a new policy which will effectively ban them from women's races.
"I do not want any athlete to be told they cannot compete at the highest level," Husain Al-Musallam, president of governing body FINA, told an extraordinary congress of his organisation.
"I understand why transgender athletes want to compete in the gender of their choice...but we should not favour one athlete over another."
"I will set up a working group that will establish an open category at some of out biggest events. We will be the first international federation to start this work."
He was speaking as FINA unveiled a policy on inclusivity which was then approved by the members.
The policy received a cautious welcome from American swimmer Alex Walsh after she won the women's 200m medley at the world championships later Sunday evening.
"I'm happy that FINA are... re-evaluating the rules," she said.
"I am not really sure what the answer is to keep things fair but obviously I hope that everyone is able to compete and as long as they are finding a way to do that then I am happy."
Brent Nowicki, FINA's CEO, said the organisation was determined "to maintain the separation of aquatic sports into men's and women's categories."
- 'Principals of fairness' -
He added that "FINA recognises that ... this policy means certain individuals may not be able to compete in the category that best aligns with their legal gender, gender identity or gender expression."
"All of us... must always, within the principals of fairness, must ensure the inclusion of all individuals irrespective of their gender orientation."
Under the rules, he said, male competition would effectively be open to all.
But "male-to-female transgender athletes... can only compete as female athletes in FINA competition, and set a world records in the female category, if they can establish they have not experienced any part of male puberty."
In the debate that followed, the policy drew criticism from members of the FINA medical committee Christer Magnusson, of Sweden, and David Gerrard from New Zealand.
"To ask or expect an 11, 12 year old boy to make a decision that will effect the rest of his life is a big ask," said Gerrard.
Last year, the International Olympic Committee announced guidelines but asked federations to produce their own 'sport-specific' rule.
FINA set up three expert committees, one medical, one legal and one of athletes, to look at the issue.
The medical committee found that men who transitioned to woman retained advantages.
"Some of the advantages males acquire in puberty are structural and are not lost with hormone suppression," said Dr Sandra Hunter of the Marquette University in Milwaukee.
"These include larger lungs and hearts, longer bones, bigger feet and hands."
The legal experts concluded that the policy of excluding most transgender swimmers would be legal.
They were "necessary and proportionate to achieve a legitimate objective," said London-based barrister James Drake.
For the swimmers, Cate Campbell, an Australian four-time Olympic gold medallist said: "My role is to stand here today and tell trans people we want you to be part of the broader swimming community ... but also to stand here and say... 'listen to the science'."
In the United States, swimming has moved to the centre of the debate over transgender women competing against natal women, as Lia Thomas has become the face of the issue.
Thomas, a freestyle specialist, competed for the University of Pennsylvania, men's team from 2017-19.
After transitioning and undergoing required hormone therapy, she raced on the women's team this season.
Thomas became the first known transgender athlete to win an elite US collegiate title when she edged Olympic medley silver medallist Emma Weyant in the 500m freestyle in Atlanta in March.