Virginia's highest court has upheld George Mason University's ban on guns in campus buildings and at sports and entertainment events.

In an opinion released Thursday, the Virginia Supreme Court affirmed a Fairfax County judge's ruling that the college's firearms policy does not violate the Second Amendment right to bear arms.

Rudolph DiGiacinto, a gun owner who is not a GMU student or employee but used the campus libraries and other facilities, had challenged the policy, arguing the prohibition on guns in buildings and at events amounted to "effectually a total ban" on carrying firearms at the university.

But the court ruled that the U.S. Supreme Court has said "the right to carry a firearm is not unlimited" and has permitted bans on guns in "sensitive places," such as schools and government buildings.

"The fact that GMU is a school and that its buildings are owned by the government indicates that GMU is a 'sensitive place,'" the Virginia opinion says.