INDIANAPOLIS (AP) — Indiana lawmakers advanced a Republican-backed bill Thursday that would ban transgender women and girls from participating in K-12 school sports that match their gender identity, despite mounting opposition that it’s unconstitutional, sexist and bigoted.

The bill would prohibit students who were born male but identify as female from participating in a sport or on an athletic team that is designated for women or girls.

But it wouldn’t prevent students who identify as female or transgender men from playing on men’s sports teams.

The legislation would also establish a civil action for violations, and schools wouldn’t be subject to liabilities for complying with it.

The measure was voted out of the House Thursday in a 66-30 vote and now heads to the Senate.