The Idaho legislation points to an emerging conflict over whether or how to regulate transgender athletes. The debate has become a wedge issue especially among conservatives trying to rally support for President Trump.

Those who want to limit the participation of transgender athletes have argued that transgender women have a competitive advantage because of their testosterone levels, though those levels can change in hormone treatment. Athletes like the Olympic marathon runner Paula Radcliffe and the tennis star Martina Navratilova have contended that athletes with higher natural levels of testosterone are able to outperform their competitors, especially in some track and field events and in weight lifting competitions. Navratilova later backed away from that view.

Caster Semenya, a two-time Olympic gold medal runner from South Africa, is the highest profile athlete to have faced a barrage of criticism, tests and, most recently, restrictions over her sex. She has identified as female since birth and has naturally occurring elevated levels of testosterone. Last July, she lost her challenge of a policy enacted by track and field’s governing body that barred her from some events unless she underwent hormone therapy.

But the science on the subject remains highly debated and inconclusive. A high natural testosterone level is not a one-step advantage in and of itself. Many have questioned why one physical trait — testosterone level — is thought to be an unfair advantage, when many of the world’s best athletes possess others — Michael Phelps’s flipper-size feet, for example — that propel them to unthinkable world records.

The Idaho High School Activities Association has a policy in place on the inclusion of transgender athletes that mirrors that of the N.C.A.A. and the International Olympic Committee. The N.C.A.A. recommends that schools require transgender athletes to complete one year of hormone treatment before competing on a female team. Similarly, the I.O.C. guidelines require transgender athletes competing on a female team to demonstrate testosterone levels below 10 nanomoles per liter for one year.