BERLIN  As an 18-year-old runner from a village in South Africa received her gold medal in Olympic Stadium on Thursday night, activity away from the track had put her at the center of an international dispute: doctors here and in her home country were examining test results to determine whether she has too many male characteristics to compete as a woman.

The case of Caster Semenya, who has burst to prominence this season, touched off a debate over whether she should be allowed to keep her medal and, more broadly, how sports officials are supposed to discern the fuzzy biological line between male and female.

Medical experts said assigning sex was hardly as easy as sizing someone up visually. Even rigorous examinations can result in ambiguous findings. Some conditions that give women male characteristics can be discovered only through intrusive physical examinations, and others require genetic analysis.

“We can get quite philosophical here  what does it mean to be male or female?” said Dr. Richard Auchus, a specialist in disorders of sexual differentiation at the University of Texas Southwestern Medical Center at Dallas.