Editor's note: This story was updated May 10 to note that the Senate gave the measure its final approval.

The Texas Senate on Tuesday gave initial approval to a measure that could keep transgender athletes from competing in high school sports.

Senate Bill 2095 by Republican state Sen. Bob Hall would give the University Interscholastic League, the governing body for high school sports, the authority to deem athletes ineligible if UIL officials determine that steroid use under a doctor’s care affects safety or fairness of play.

UIL rules already ban steroid use. But transgender athletes are allowed to participate even while receiving hormone therapy as prescribed by a doctor under a safe harbor provision in the state education code.

SB 2095 would amend the safe harbor provision to allow UIL officials to disqualify students because of doctor-approved steroid use. Under the proposal, students using the safe harbor provision would also have to notify the UIL about the steroid use and provide related medical records.

The proposal faced opposition from some of the chamber’s Democrats, who questioned the discriminatory effect it would have on transgender athletes.

“I don’t believe we can sit back and ignore the fact that there are students who are transitioning and are taking legally prescribed medication from their doctors and they may be competing in UIL sports,” state Sen. José Menéndez, D-San Antonio, told Hall on the floor. “I don’t think we should ever discriminate against these students.”

Four Democrats ultimately joined with the chamber’s Republicans to pass the measure on a 24-7 vote.

In defending the measure, Hall argued the legislation was not meant to automatically disqualify transgender athletes but instead give UIL the oversight authority to “protect the other students who are playing” from “unsafe situations.”

“This bill is not addressing who plays on what sports,” Hall said. “This bill is addressing individuals who ... are taking steroids, then make sure, as a result of that, the events remain safe and fair.”

Consideration of the bill follows scrutiny of Mack Beggs’ state championship win. A transgender 17-year-old boy, the Euless Trinity wrestler went on to win a girls wrestling championship while taking testosterone, as allowed by UIL’s current steroid policy.

Because UIL rules require student athletes to compete as the gender listed on their birth certificate, Beggs was forbidden from competing against boys.

“This bill would permit the UIL from banning athletes like Mack because of the argument that their health-based treatment would create an unfair advantage and therefore discriminate against trans athletes considering most trans athletes don’t have immediate access to have their birth certificates changes appropriately,” state Sen. Sylvia Garcia, D-Houston, said while proposing an amendment to require the UIL to adopt the NCAA’s trans-inclusive policies for college athletes. The amendment was voted down.

The measure must still receive final approval by senators before it’s sent over to the House. That could come as early as Wednesday. (Update, May 10: The Senate gave final approval to SB 2095 on Wednesday in a 22-8 vote.)