The University of Texas announced it will allow concealed handguns in classrooms, but will bar them from on-campus dorm rooms, under the new state law.

"I do not believe handguns belong on a university campus, so this decision has been the greatest challenge of my presidency to date," University of Texas President Greg Fenves said in announcing his decision to adopt rules recommended by a campus study group in December. Fenves opposes allowing guns on the roughly 50,000-student campus, reported Fox News.

Fenves’ recommendation that handguns should be banned from on-campus dorm rooms could be rejected or altered by the university’s Board of Regents, according to the Dallas Morning News. If they are approved then handguns will be allowed most offices and off-campus residence halls in addition to classrooms.

Fenves said his revised measure brings a balance between the law passed by the Legislature and addressing concerns of students, faculty and other staff who have opposed the so-called “campus carry” measure, according to Fox News.

“I empathize with the many faculty members, staffers, students and parents of students who signed petitions, sent emails and letters, and organized to ban guns from campus and especially classrooms,” he said. “As a professor, I understand the deep concerns raised by so many. However, as president, I have an obligation to uphold the law.”

About 5 percent of Texans older than 21 are licensed to carry concealed handguns, but Gary Susswein, a university spokesman, said the university had no way of knowing what the numbers were for staff or students, reported the New York Times. “Under state law, we’re not allowed to ask people if they have concealed carry licenses,” he said.

Private schools, including Baylor, Rice, Southern Methodist and Texas Christian, have opted to keep banning weapons on campus, Fox News said. State lawmakers allowed public universities to carve out some gun-free zones as long as it didn't result in a campus-wide ban.

In most cases, a person must be 21 years old to get a gun license in Texas, which trims the gun-carrying student population a bit. And while licensed students will be allowed to bring their handguns to class, they won't be able to do so openly. A separate law that allows the open carry of handguns doesn't apply to college campuses.

Laboratories will remain gun-free, as will areas or events that involve school-age children, the Times said. State law still prohibits weapons at sporting events.

Guns will generally be banned from dorm rooms, but they will be allowed in residence hall common areas such as dining rooms and study areas, said the Times.

Family members who are licensed to carry can keep their weapons when visiting students. University staff members who are licensed to carry may also hold onto their weapons if they must enter a dorm.

The rules now go to the University of Texas System Regents for review. If no changes are made within 90 days, the rules will be final.