The Texas House tentatively passed a bill allowing concealed handguns in classrooms and public college campuses on Tuesday, minutes before the midnight deadline. Under current law, Texans can carry concealed weapons onto university grounds. But the new bill aims to expand it to areas including dorms, classrooms and cafeterias.

The bill was pushed through by Texas Republicans after an hours-long debate that saw Democrats trying to delay the bill past its deadline. But a threat from Republicans to force a vote led to a tentative approval of a weakened version of the bill.

Senate Bill 11 was tentatively passed on Tuesday by a 101-47 vote after over 100 amendments were scrapped from it.

Finally our students will be protected, our professors will be protected and law abiding citizens will be protected,” Rep. Giovanni Capriglione, R-Southlake, said, according to the Star-Telegram.

A bipartisan amendment that was added to the bill would allow private universities to opt out of the program, but not public universities; the latter can, however, specify on which areas of their campuses the concealed handguns would be allowed. Lawmakers reportedly said the measures would likely ban concealed carry at medical centers and bars on the campuses.

Public college officials warn that the cost of training and safety measures, and additional security officers, due to the new move could cost up to $50 million over the next few years, which might have to be borne by the students. Rep. Ramon Romero Jr., D-Fort Worth, called it a “horrible idea,” and said the plan was deeply unpopular on college campuses.

“It’s just the completion of a campaign promise … something on some folks’ wish lists,” he reportedly said.

The bill awaits final confirmation from the House on Wednesday, after which it would head to the desk of Texas Gov. Greg Abbott, who has said that he will sign any legislation that strengthens gun rights.

The bill’s proponents said it was an expansion of the state’s constitutional Second Amendment rights. Senate Bill 11 heads to Abbott’s desk alongside another one, which would allow licensed open carrying of firearms in the state.

An analysis by the Dallas Morning News found that most Texas' university students would be ineligible due to an age restriction that allows only those 21 years or older to acquire a concealed handgun license.