Transsexuals will be allowed to compete in the Athens Olympics.
The International Olympic Committee said athletes must have had appropriate surgery and be legally recognised as members of their new sex.
The ruling, which has long been debated by the IOC, will cover both male-to-female and female-to-male cases.
"This has been something of an open door," said IOC medical director Patrick Schamasch. "We needed some rules and regulations in place."
The IOC also stipulated that hormone treatment must have ceased at least two years before competition.
Until 1999, it had conducted gender verification tests at the Olympics but the controversial screenings were dropped before the 2000 Sydney Games.
But fears remain that certain male-to-female competitors could have a genetic advantage over their fellow participants.