The state also would establish a 24-hour hotline for people to get help for a relative or friend who they think is suffering a sudden mental decline in late adolescence.
Maryland's effort to address mental health issues is its first attempt since the 2007 shooting at Virginia Tech University. In response to that massacre, Maryland started requiring everyone buying a gun to sign a waiver allowing authorities to do criminal and mental health background checks.
Virginia, where there are dramatically more gun purchases than in Maryland, took a tougher approach after Virginia Tech.
In the commonwealth, people are immediately banned from purchasing guns when they are ordered into treatment against their will. People found not guilty of a crime by reason of insanity also are put on the proscribed list, which as of January contained 184,133 names, according to state police.
By population, that means a Virginia resident is nearly three times as likely to be banned from possessing a firearm for mental health reasons as someone who lives in Maryland.
Virginia's restrictions led the state to reject for mental health reasons 235 requests to buy firearms in 2011 and 340 in 2012.
It also has made it harder for those banned in Virginia to purchase a gun in other states. Virginia sends all of its data on involuntary commitments and compulsory treatment to the FBI's national database.
State Police Lt. Col. Robert Kemmler called Virginia's system critical to public safety. "It's beneficial information to us as a law enforcement agency, when the whole purpose of the instant check program is to protect the public."
Even with the 2007 waiver requirement in Maryland, the state has no comprehensive database of the dangerously mentally ill, and the state police, who regulate guns, cannot get access to records of patients from private psychiatric facilities, which in Maryland outnumber the handful run by the state.