CHEYENNE, Wyo. (AP) — The Wyoming House has passed a bill that would allow people with concealed carry permits to take their guns to any public facility or gathering.

The bill would preserve the ban on weapons in courtrooms and allows private businesses and property owners to prohibit guns.

The House passed the bill by a vote of 42-to-17 on Monday morning. It now heads to the Senate.

Supporters say the bill would improve public safety by discouraging armed attackers.

Opponents, including officials from the University of Wyoming, have said schools and public places should be free of guns. They say accidents with guns would be more of a problem than potential attackers.