AUSTIN, Texas (Reuters) - A U.S. district judge on Monday denied a motion from three University of Texas professors who wanted to ban guns in their classroom after the state gave some students that right under a law then went into effect this month.

The professors had argued academic freedom could be chilled under the so-called “campus carry” law backed by the state’s Republican political leaders. The law allows concealed handgun license holders aged 21 and older to bring handguns into classrooms and other university facilities.

But U.S. District Judge Lee Yeakel said the professors “have failed to establish a substantial likelihood of ultimate

success on the merits of their asserted claims,” and denied a motion for an injunction to ban guns.

“It appears to the court that neither the Texas Legislature nor the (university’s) Board of Regents has overstepped its legitimate power to determine where a licensed individual may carry a concealed handgun in an academic setting,” Yeakel said.

Republican lawmakers said campus carry could help prevent a mass shooting.

“There is simply no legal justification to deny licensed, law-abiding citizens on campus the same measure of personal protection they are entitled to elsewhere in Texas,” Attorney General Ken Paxton, a Republican, said in a statement.

University of Texas professors had lobbied unsuccessfully to prevent campus carry, arguing the combination of youth, firearms and college life could make for a deadly situation.

“Sometimes a public policy is so extreme that it can catch the courts by surprise and take them some time to catch up,” said Renea Hicks, a lawyer for the professors.

The lawyers are considering what their next move will be.

The university has threatened to punish professors who try to ban guns in classrooms.

The professors had argued that they discuss emotionally laden subjects such as reproductive rights in class, and they would be forced to alter their classroom presentations because of potential gun violence.

The Texas campus carry law took effect on Aug. 1 as the University of Texas held a memorial to mark the 50th anniversary of one of the deadliest U.S. gun incidents on a college campus.

On Aug. 1 1966, student Charles Whitman killed 16 people in a rampage, firing from a perch atop the clock tower at the University of Texas at Austin, the state’s flagship public university.

Eight states have provisions allowing the carrying of concealed weapons on public postsecondary campuses, according to the National Conference of State Legislatures, which tracks state laws.