The Idaho Senate on Monday approved a bill that bans transgender women and girls from playing on female high school and college sports teams.

Senators approved House Bill 500 with a 24-11 vote. The House previously passed the legislation, but an amendment in the Senate means a second vote in the House is needed before heading to the desk of Governor Brad Little, a Republican.

The legislation would apply to all publicly sponsored sports teams. Supporters said it is needed because transgender women and girls have a physical advantage. Opponents said that the bill would subject transgender athletes to invasive tests.

The bill, titled the “Fairness in Women's Sports Act,” was sponsored in the Senate by Senator Mary Souza, a Republican from Coeur d'Alene.

The bill's sponsor in the House, Representative Barbara Ehardt, a Republican from Idaho Falls, worked with the Alliance Defending Freedom (ADF) to craft the bill. The Arizona-based group is opposed to LGBT rights.

According to the Idaho Press, when asked about the bill's constitutional problems that would make it difficult to defend in court, Senator Souza said that the ADF “will be responsible for any legal defense fees.”

The Human Rights Campaign (HRC), the nation's largest LGBT rights advocate, called on Governor Little to veto the bill if it reaches his desk.

“If HB 500 becomes law, Idaho will be the first state to have such a retrogressive, invasive and patently anti-transgender law on the books,” HRC President Alphonso David said in a statement. “In states across the country, extreme lawmakers are targeting transgender youth and seeking to discriminate against them through any legislative vehicle possible. These elected officials and the groups backing them are proposing a ‘solution’ in search of a problem – and using transgender kids as pawns to stoke division at a time when our elected leaders should be finding ways to unite us. If HB 500 becomes law, it will send a strong message to trans youth that they are less than their peers and not deserving of community and acceptance. We implore Governor Little and other legislative leaders to stand up and reject this discriminatory measure.”