Some female runners with naturally high testosterone levels will have to race against men or change events unless they take medication, under new rules issued by athletics' governing body.
The rules, which start on 1 November 2018, would apply to women who race in track events from 400m up to the mile.
The IAAF believes the new measures will stop women with high testosterone levels gaining a competitive advantage.
Olympic 800m champion Caster Semenya is expected to be among those affected.
The South African runner has previously been asked to undertake gender testing by athletics chiefs but no results have ever officially been made public.
Similar restrictions brought in by athletics' world governing body, the International Association of Athletics Federations, were suspended following a legal challenge by the Indian sprinter Dutee Chand in 2015.
- Archive: Sport & gender - A history of bad science & 'biological racism'
- 'I lost all honour in gender case' - Chand in 2015
"The revised rules are not about cheating - they are about levelling the playing field to ensure fair and meaningful competition," IAAF president Lord Coe said.
"We want athletes to be incentivised to make the huge commitment and sacrifice required to excel in the sport."
Speaking after winning the 800m and 1500m title at the Commonwealth Games in April, Semenya said she could move up to longer-distance events.
"When I do my long runs I feel like I can feed into distance running," the 27-year-old said.
Athletics South Africa said they will support "all our athletes who may be affected by this new ruling".
What do the new rules say?
The rules for athletes who have 'differences of sexual development' apply to the 400m, 400m hurdles, 800m, 1500m, one mile races and combined events over the same distances.
However, 100m, 200m and 100m hurdles are exempt, as are races longer than one mile and field events.
Female athletes affected must take medication for six months before they can compete, and then maintain a lower testosterone level.
If a female athlete does not want to take medication, then they can compete in:
- International competitions in any discipline other than track events between 400m and a mile
- Any competition that is not an international competition
- The male classification at any competition, at any level, in any discipline
- Any intersex, or similar, classification
Those who want to compete are not required to undergo surgery.
The IAAF statement said that the rules are "in no way intended as any kind of judgement on or questioning of the sex or the gender identity of any athlete".
It pointed to their latest research which showed there is a performance advantage for females with higher testosterone over the track distances.
How did we reach this point?
Semenya, then 18, was asked to take a gender test shortly before she won the 800m at the 2009 World Championships in Berlin.
Athletics South Africa president Leonard Chuene later admitted that he had lied to Semenya about the purpose of the test, having told her it was a random doping test.
The results were not released - although there were media reports that her test had revealed male and female characteristics - and Semenya was cleared to return in July 2010.
Indian sprinter Chand became the first athlete to challenge the IAAF's policy around so-called gender tests and naturally high testosterone levels in female athletes in 2015.
As an 18-year-old, Chand was given a hormone test, and found out from reading the press that her natural levels of the hormone testosterone were normally only found in men.
She successfully challenged her subsequent ban, which led to the Court of Arbitration for Sport (Cas) suspending the IAAF's "hyperandrogenism" rules for two years.
Cas expressed concerns over the lack of evidence proving the precise degree of competitive advantage that a hyperandrogenic athlete would possess, and gave the IAAF two years to demonstrate its case.
Research commissioned by the IAAF in July 2017 found that female athletes with high testosterone levels had a "competitive advantage".
However, critics of the governing body have said its stance is discriminatory, and highlighted the possible psychological effects on those who have to take the tests.
What is the history of gender testing?
- 1936: Polish runner Stella Walsh and America's Helen Stephens are accused of being male imposters during the Berlin Olympics.
- 1938: German high jumper Dora Ratjen is identified as male, and Germany return the gold medal won at the European Championship. Der Spiegel wrote in 2009 that Ratjen was born with ambiguous genitalia and was raised as a girl at the suggestion of a midwife.
- 1968: International Olympic Committee begin comprehensive "gender testing".
- 1972-1984: 13 women "fail" gender tests.
- 1985: Spanish hurdler Maria Jose Martinez-Patino is told her chromosome test is abnormal. Martinez-Patino refuses to quit or feign injury, and further investigation reveals that a genetic condition meant she was insensitive to testosterone that was in her blood.
- 2009: Caster Semenya is asked to take a gender test and the results are reported in the media.
- 2014: Dutee Chand is banned from competing after results of a gender test.
- 2015: Chand has her ban overturned and the IAAF rules requiring female athletes to take testosterone-suppressing medication are suspended for two years.