Evert Nelson/The Capital-Journal/USA Today Network
Rep. Heather Meyer shows her "protect trans youth" t-shirt to legislature members following Wednesday's vote to override Gov. Laura Kelly's veto of an anti-trans sports bill.
CNN  — 

Transgender women and girls in Kansas will no longer be allowed to compete on sports teams from kindergarten through college consistent with their gender, after state lawmakers on Wednesday overrode a veto from their governor to enact the restriction.

The law is set to take effect on July 1.

Gov. Laura Kelly had vetoed HB 2238 – dubbed the “The Fairness in Women’s Sports Act” – last month, marking the third time in three years she had rejected a transgender sports ban passed by the legislature. Of the latest effort, she said in her veto message: “Let’s be clear about that this bill is all about – politics.”

“It won’t increase any test scores. It won’t help any kids read or write. It won’t help any teachers prepare our kids for the real world. Here’s what this bill would actually do: harm the mental health of our students,” she said.

But on Wednesday, Kansas’ Republican-controlled legislature voted overwhelmingly along party lines – 84-40 in the House and 28-12 in the Senate – to bypass the governor.

“The Fairness in Women’s Sports Act protects the rights of female athletes in the state by requiring that female student athletic teams only include members who are biologically female,” state House Speaker Dan Hawkins, Majority Leader Chris Croft and Speaker Pro Tem Blake Carpenter said in a joint statement.

Advocates of such measures have argued that transgender women and girls have physical advantages ​over cisgender women and girls in sports. But a 2017 report in the journal Sports Medicine that reviewed several related studies found “no direct or consistent research” on trans people having an athletic advantage over their cisgender peers, and critics say this legislation adds to the discrimination that trans people face, particularly trans youth.

Bill Faflick, executive director of the Kansas State High School Activities Association, told CNN in an email that “there are three transgender female students eligible to compete in Kansas this school year.”

Democratic state Rep. Heather Meyer, who has been outspoken against the measure, told CNN this bill will affect families like hers.

“We love our kids and we want the best for them. And part of that includes sporting activities. And this is just another in a long line of anti-trans youth bills that is spreading across the country like wildfire,” Meyer said.

Casey Pick, director of law and policy at The Trevor Project, a suicide prevention and crisis intervention organization for LGBTQ youth, argued in a statement that the bill isn’t about fairness.

“This harmful and unnecessary bill has nothing to do with ‘fairness’ in sports, and everything to do with lawmakers’ efforts to push trans young people to the sidelines in hopes of scoring political points,” Pick said.

The restrictive bill joins others being pushed by Republicans across the country targeting LGBTQ rights, with Idaho’s GOP governor on Wednesday signing a bill making it a felony to provide some gender-affirming health care to transgender youth.

Last week, Kentucky’s legislature overrode its Democratic governor’s veto of a bill that places bans on gender-affirming care for minors, on discussions of sexual orientation or gender identity in school, and on transgender students using bathrooms that align with their gender identity. The move comes after state lawmakers last year overrode another veto by the governor to enact its own anti-trans sports ban.

This story has been updated with additional reporting.

CNN’s Devan Cole contributed to this report.