A new law takes effect today aimed at keeping guns out of the hands of the seriously mentally ill. The state will now begin sending more information to a national criminal background check database.

Anyone who wants to buy a gun from a gun store must submit to a background check. Store owners run the buyer’s information through a few national databases, including the National Instant Criminal Background Check System, or NICS. Until recently, Rhode Island shared only criminal records with NICS.

Now, the state will be able to submit limited information about people who are involuntarily committed in court for mental health treatment or deemed by a judge to pose a threat of violence to themselves or others.

The law is the work of a joint legislative task force on behavioral health and firearm safety, convened after the tragedy in Newtown, Connecticut.