Texas Governor Greg Abbott signed a new law Monday that effectively bans transgender students from playing in public school sports that are aligned with their gender identities. The bill cleared the Legislature earlier this month.

The new law will not allow transgender students to join school sports teams that are not based on their assigned sex at birth. This means that male students who identify as female cannot join female-only teams and vice versa.

The law will affect all schools in Texas from public elementary schools and college universities. It will also cover all sports teams within those schools. The law is set to take effect in January.

Representative Valoree Swanson, a sponsor of the bill, said that the law was all about "girls and protecting them," particularly within the state's University Interscholastic League. Swanson added that there need to be laws that ensure a level playing field.

"We need a statewide level playing field. It's very important that we, who got elected to be here, protect our girls," Swanson said.

Student-athletes who want to play on teams that are not aligned with the gender they were assigned with at birth can still do so but it will require them to acquire a court order to change their gender markers. Critics of the legislation have slammed its passing, calling it "discriminatory" and a violation of the rights of the LGBTQ community.

Meanwhile, supporters of the law praised its passing as there have been numerous instances where transgender athletes have had an unfair advantage in some events. Supporters have provided several examples of how athletes who were born male competed unfairly in women's sports.

LGBTQ advocacy group, Equality Texas, said Monday that such laws are not the correct way of protecting children. The group said lawmakers are completely missing the point as they should allow transgender kids to play with whomever they like without fear of discrimination.

Texas has proposed more than 40 bills targeting transgender children. However, the law banning transgender school sports is the first one to be signed into law. Texas is now the 10th state to pass legislation that bans transgender kids from playing on teams that do not match the gender assigned to them when they were born.