Chicago (AFP) - The University of Texas at Austin begrudgingly agreed Wednesday to allow students to carry guns into classrooms, months after state lawmakers passed a bill outlawing gun bans at public universities.

"I do not believe handguns belong on a university campus, so this decision has been the greatest challenge of my presidency to date," university president Gregory Fenves said in a statement.

"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."

Some faculty members have threatened to quit rather than allow students to carry guns in their classrooms, saying the presence of such weapons is too threatening in an environment that is meant to encourage debate.

The issue is particularly sensitive given that the University of Texas at Austin was the scene of one of the nation's first mass shootings on a college campus.

Troubled former Marine Charles Whitman killed 14 people and wounded some 30 others after opening fire from an observation platform on the university's clock tower in 1966.

Gun rights activists have responded to a series of more recent campus shootings by arguing that students cannot trust the police to protect them from random acts of violence and should be able to arm themselves.

Lawmakers in the politically conservative state with a cowboy ethos and frontier history agreed and passed a bill in August prohibiting gun bans on public college campuses.

Fenves noted that the presidents of every large private institution in Texas -- including Baylor University, Southern Methodist University and Rice University -- have exercised their right to continue to ban guns on campus.

"The presence of handguns at an institution of higher learning is contrary to our mission of education and research, which is based on inquiry, free speech, and debate," he said.

"However, as president, I have an obligation to uphold the law."

Guns can still be banned at sporting events, in university bars and medical facilities, certain laboratories and college dorms.

The University of Texas at Austin is one of the largest public institutions in the United States with more than 51,000 students and a stellar academic reputation. It is the flagship of the University of Texas system, which educates more than 214,000 students.