Kentucky’s Legislature voted Wednesday to override Gov. Andy Beshear’s veto of a bill that would prohibit transgender girls and women from playing on female sports teams, making the state the sixth to enact such a law this year and the 15th to date.

Beshear, a Democrat, vetoed the bill last week, saying it “most likely” violates the Constitution because it “discriminates against transgender children.” Proponents contended that the measure was necessary to protect the rights of cisgender girls and women in school sports. 

The override passed the Senate in a 29-8 vote and the House in a 72-23 vote. The law takes effect immediately.

“This is a huge win for the integrity of women’s sports and with the inevitable enactment of Senate Bill 83 into law,” Republican state Sen. Robby Mills, one of the bill’s co-sponsors, told reporters after the vote. “Kentucky is a leading voice for female athletes across the nation. The Kentucky General Assembly stands in support of female athletes everywhere as they work hard to achieve their goals and dreams.”

The debate over transgender athletes has been catapulted into the center of the nation’s culture wars after the recent success of the University of Pennsylvania transgender swimmer Lia Thomas.

Thomas became the first trans athlete to win an NCAA championship last month, placing first in the 500-yard freestyle race at the Division I finals in Atlanta, after a successful season on the Penn women’s swimming and diving team.

Mills and other conservative lawmakers invited University of Kentucky swimmer Riley Gaines, who swam against Thomas in an NCAA championship race, to bolster the case for the law’s enactment. Gaines told reporters Wednesday that she wants the NCAA to change its guidelines for transgender athletes.

“I know I speak for the majority of female athletes across every NCAA sport when I say biological males should not be competing against women,” Gaines said. “It’s crucial for the NCAA to open its eyes and recognize the irrefutable damage being done to everything Title IX stands for: equity, fairness and creating opportunities for women to succeed at an elite level and in life.”

In January, the NCAA instituted a sport-by-sport policy for transgender athletes, allowing each sport’s national governing body to determine its own rules. The International Olympic Committee adopted similar guidelines last year.

The Kentucky Legislature voted to override Beshear’s veto in a broader nationwide culture war over LGBTQ, and particularly transgender, issues.

From Jan. 1 to March 15, state legislators proposed a record 238 bills that would limit the rights of LGBTQ people — or more than three a day — about half of them targeting transgender people specifically, according to an NBC News analysis of data from the American Civil Liberties Union and the LGBTQ advocacy group Freedom for All Americans.

This year’s historic tally quickly follows what some advocates had labeled the “worst year in recent history for LGBTQ state legislative attacks,” when 191 bills were proposed last year.

Measures that would block trans students from competing on school sports teams that align with their gender identity have been among the most successful of the anti-LGBTQ bills filed in recent years, with more than a dozen becoming law nationwide.

This year, before Kentucky, legislators in five other states — Arizona, Oklahoma, South Dakota, Utah and Iowa — enacted trans athlete bills.

Last month, Utah Gov. Spencer J. Cox also vetoed a version of the measure in his state, citing data that only four trans high schoolers played sports in Utah.

“Rarely has so much fear and anger been directed at so few,” Cox, a Republican, wrote in a letter to the state Senate president and House speaker. “I don’t understand what they are going through or why they feel the way they do. But I want them to live. And all the research shows that even a little acceptance and connection can reduce suicidality significantly.”

A survey last year by the Trevor Project, an LGBTQ youth suicide prevention and crisis intervention organization, found that 42 percent of the nearly 35,000 LGBTQ youths who were surveyed seriously considered suicide within the previous year. More than half of transgender and nonbinary youths who were surveyed seriously considered suicide, it also found.

As in Kentucky, Utah’s Legislature voted to override the governor’s veto.

Follow NBC Out on TwitterFacebook & Instagram