Colorado University will no longer allow concealed weapons in undergrad dormitories, but will continue to allow them elsewhere on campus. KUSA's Meagan Fitzgerald reports.

Updated at 4:57 p.m. ET: The University of Colorado will segregate students who have concealed-weapons permits in special dorms, but their firearms will have to be locked up before bedtime, according to campus police.

University officials have amended their student housing contract at its Boulder and Colorado Springs campuses to accommodate students who are 21 years or older and have concealed-weapons carry permits, said Ryan Huff, public information officer with the University of Colorado's campus police in Boulder.

"If you have a permit, you can carry a concealed weapon on campus, as long as its hidden away from view, and you can even have it with you in class," Huff told NBC News. "What you can not do is have it on you at a ticketed event, such as football games, or in any of the residence halls on campus."

The university’s policy change comes after the Colorado Supreme Court upheld an appeals-court decision in March that struck down the university’s ban on guns.

“I believe we have taken reasonable steps to adhere to the ruling of the Colorado Supreme Court, while balancing that with the priority of providing a safe environment for our students, faculty and staff,” CU-Boulder Chancellor Philip P. DiStefano said in a statement on the university’s website.

Stay informed with the latest headlines; sign up for our newsletter

University officials say both campuses will establish a residential area for students with permits but will ban guns in all other dormitories, according to the new policy.

Huff said those who live in residence halls will have to lock up their firearms with police, but can check out their weapon before and after they go to their residence hall. For those living in family housing units, he said, safes will be established and supervised by the housing monitor.

Watch the Top Videos on NBCNews.com

"Ultimately, CU-Boulder and Students for Concealed Carry have the same goal in mind, the safety of campus patrons," David Burnett, director of public relations for Students for Concealed Carry, said in an email to NBC News. "We feel that CU's previous policy of expecting criminals to comply with 'no-gun' stickers on the doors was absurdly ineffective, and are happy they have made the change to allow campus carry."

The new policy, however, isn’t sitting well with James Manley, a lawyer for the Mountain States Legal Foundation, a nonprofit group in Lakewood, Colo., that advocates liberty and freedom.

"We still need to see the actual language of the policy before we make a decision on how to proceed," Manley told The Daily Camera in Boulder.

University officials say less than 1 percent of its staff, faculty and students have concealed-carry permits, according to the Boulder newspaper.

Under Colorado law, to get a concealed-carry permit, a person must be 21 or older, get a federal background check and demonstrate competence with a firearm, including through a class, or military or police service.

On July 20, a mass shooting occurred at a midnight screening of "The Dark Knight Rises" in the suburb of Aurora. James Holmes, a 24-year-old former doctoral student at the University of Colorado, is accused of killing 12 people and injuring 58 others in the spree.

Huff said there is no connection between the university's new policy and the Aurora shootings.

"The university wanted to make sure its new policy was in place before students returned for the school year," he said.

According to the university website, students will start returning to residence halls on Tuesday; classes begin for the semester on Aug. 27.

Do you have an education-related story or idea, contact NBC News' Sevil Omer at sevil.omer@msnbc.com

More content from NBCNews.com:

Follow US News from NBCNews.com on Twitter and Facebook