MONTPELIER, Vt. — More than 500 Vermont residents have been added to the national database of those barred from having guns because state courts ordered hospitalization or other treatment for dangerous mental illnesses.

A state law that took effect in 2015 requires state courts to report to the National Instant Criminal Background Check System within 48 hours when a suspect in a criminal case has been committed to the custody of the Department of Mental. It also requires reporting when a court has ordered someone to be hospitalized or to undergo outpatient treatment because their mental illness makes them a danger to themselves or others.

The Burlington Free Press reports that 589 names have been added to the database from Vermont since the law took effect, according to a recent report by Vermont Court Administrator Patricia Gabel.

Supporters of the requirements said they were concerned that background checks were not identifying people with dangerous mental illness. Opponents argued that the law would further stigmatize mental illness.

Wilda White, executive director of Vermont Psychiatric Survivors, said some people have been surprised and confused after getting letters stating they had been added to the database.

“People are not being apprised of the ramifications of stipulating to this sort of non-hospitalization,” she said. “I don’t think people would ever imagine that they’re going to be reported to a national database as a result of it.”

State law allows people to file a petition in court to restore their right to buy guns. None has yet attempted that process, according to the report.

Information from: The Burlington Free Press,