The Republican-controlled legislature in Kentucky voted Wednesday to override Democrat Gov. Andy Beshear's veto of legislation that would prohibit transgender athletes from competing in sex-segregated sporting events from sixth grade through college.

The expected move came after Beshear refused to sign Senate Bill 83 last week and claimed it was most likely unconstitutional. He said the legislation "discriminates against transgender people" and therefore would not hold up in court.

FRANKFORT, KY - JULY 29: Kentucky State Capitol in Frankfort, Kentucky on July 29, 2019.

Kentucky State Capitol in Frankfort, Kentucky on July 29, 2019. (Photo By Raymond Boyd/Getty Images)

The measure is now law in the state after the Republicans overrode the veto of the legislation, which originally passed through the state House with a 70 to 23 vote and the state Senate with a 26 to 9 vote.

PENNSYLVANIA HOUSE PASSES BILL PREVENTING TRANSGENDER FEMALES FROM COMPETING IN FEMALE SPORTS

Under the new law, a student’s gender will be determined by the "biological sex" indicated on the student’s certified birth certificate "as originally issued at the time of birth or adoption." This means individuals who transitioned to female later in life could not participate on sports teams designated female in the state.

Republican Sen. Robby Mills, the bill’s lead sponsor, has said the measure would ensure girls and women compete against other "biological females."

Andy Beshear, governor of Kentucky, speaks during a news conference in Frankfort, Kentucky, U.S., on Thursday, Jan. 27, 2022. (Jon Cherry/Bloomberg via Getty Images)

Mills has said the bill reflects concerns from parents across the Bluegrass State. He said it "thinks ahead" to prevent situations where girls or women are unfairly competing against biological males.

"It would be crushing for a young lady to train her whole career to have it end up competing against a biological male in the state tournament or state finals," Mills said during a previous debate on the bill.

In vetoing the measure, Beshear said its backers had failed to present a "single instance" in Kentucky of someone gaining a competitive advantage as a result of a "sex reassignment."

CLICK HERE TO GET THE FOX NEWS APP

A car is seen at driving by the Capitol Building on January 16, 2021 in Frankfort, Kentucky. (Jon Cherry/Getty Images)

"Transgender children deserve public officials’ efforts to demonstrate that they are valued members of our communities through compassion, kindness and empathy, even if not understanding," the governor wrote.

The measure also faced criticism from others in the state.

"This bill is a solution in search of a non-existent problem," said Samuel Crankshaw, a spokesperson for the American Civil Liberties Union of Kentucky. "It is rooted in hate and unconstitutional."

Fox News' Timothy H.J. Nerozzi and The Associated Press contributed to this article.