AUGUSTA, Maine — In reaction to President Barack Obama’s proposed responses to the school shooting in Newtown, Conn., gun rights and gun control advocates voiced rare agreement in the belief that government should do more to keep firearms away from people with mental illness.

But legal and procedural obstacles make doing so difficult in Maine. State and federal laws require information about individuals involuntarily committed to a psychiatric hospital by a judge to be collected in a central database to prevent them from being able to purchase a firearm, but neither Maine, nor the federal government, has allocated funding to pull together the data. And recent court rulings affirming gun ownership rights for people suffering from mental illness complicate the situation.

An August 2012 U.S. District Court ruling illustrates the legal conundrum that arises when laws designed to protect public safety conflict with those aimed at protecting the Second Amendment, particularly when people with mental illness assert their right to possess firearms.

A summary of “U.S. v. Spring” lays out the details. In late December 2010, police went to the home of an Owls Head man after he started boarding up windows and asking neighbors to help him fend off intruders. Police found no evidence of intruders, but they did find a “loaded bolt-action shotgun with a round in the chamber and three rounds in the clip,” according to court records.

Concerned about the agitated man’s mental state, police told him they planned to take him to a hospital for evaluation. They placed his gun in the trunk of a cruiser and drove him to a hospital, where a doctor examined him and certified that he had “a mental illness that caused a substantial risk of harm to others.”

As Maine law prescribes, a justice of the peace approved the man’s emergency involuntary admission to the hospital’s psychiatric unit. The following day, a psychiatrist re-evaluated him, confirming that he suffered “from a form of psychosis and represented a danger because of the loaded gun,” court records state.

That diagnosis allowed the hospital to keep the man for three days, under Maine law related to emergency involuntary commitment, a process known as a “blue paper.” Authorities did not seek a longer involuntary commitment, known as a “white paper,” which requires that a judge deem the person to have a mental illness and “present a likelihood of serious harm,” after a hearing in which the person must be represented by an attorney.

The man left the hospital voluntarily and soon started trying to buy a gun. His first attempt so alarmed the gun dealer that he alerted the ATF and a sheriff’s deputy. The next day, the man again attempted to purchase a handgun, this time denying that he had been involuntarily committed on the form federally licensed dealers must ask potential customers to complete in compliance with federal law related to background checks.

The background check delayed the purchase, and the man was convicted in 2011 of making a false statement in connection with the acquisition of a firearm, making a false statement during the purchase of a firearm and possession of a firearm by a prohibited person. At the time of his arrest, Maine law banned anyone who had been involuntarily committed, whether by “blue paper” or “white paper,” from possessing a firearm.

However, in January 2012, the First Circuit Court of Appeals, in a Maine-based case titled “U.S. v. Rehlander,” ruled that the firearms ban could apply only to individuals who received due process by going through a judicial hearing. The court cited a 2008 U.S. Supreme Court decision in “Heller v. D.C.,” to overturn previous legal interpretations that made it illegal for any person who had been “blue papered” to possess a firearm.

The Rehlander decision spurred District Court Judge John Woodcock Jr. to overturn the two remaining convictions in the Owls Head man’s case, after the government dismissed the possession charge, despite Woodcock’s belief that the man “and those around him would be safer and better off if he did not have the right to bear arms and, but for Rehlander, the court would not hesitate to issue a judgment that constrained that right.”

To better equip law enforcement with information about people who raise similar concerns, Rep. Mark Dion, D-Portland, an attorney, former sheriff and co-chairman of the Criminal Justice and Public Safety Committee, plans to propose legislation that would require medical providers to notify police when they discharge someone committed involuntarily by police intervention.

Mark Joyce, managing attorney for the Disability Rights Center of Maine, says the Rehlander decision should shift policymakers’ focus from enacting state gun control laws, which would likely run afoul of federal court affirmations of the Second Amendment, to mental health care reforms that lower barriers for people who need mental health services.

“You can’t predict violence,” he said. “In terms of Maine law, I don’t know what they could change to make involuntary commitment laws different within the confines of [the Rehlander] determination. I think the issue is that laws are on the books. The question is why do people not receive services.”

Some don’t receive services, Dion said, because the state lacks a network to intervene when families, police or medical professionals see a person with mental illness start on a downward trajectory. “If it was just about guns, it would be easier, but it’s a lot of components,” he said. “Another piece involves how we collect information and data. Are we providing all the agencies with the data they need about people seeking to get firearms?”

When it comes to providing information about people whose involuntary commitment was authorized by a judge after a hearing, the answer is no. Maine law requires that the state submit the names, gender, date of birth and confirmation that a person was involuntarily committed, which makes it illegal for them to possess a gun under federal law, to the FBI. That information goes into the National Instant Criminal Background Check System.

The state sends information about people found not guilty by reason of insanity, another federal prohibition for gun ownership, to the FBI, but it has not sent information on individuals involuntarily committed since 2008.

Until 2008, Maine law prevented state agencies from releasing information about involuntarily committed individuals. Following changes in federal law prompted by the mass shooting at Virginia Tech in 2007, Maine changed its law to comply with federal requirements designed to create a better database for gun sales background checks. However, the Maine law stipulated that the state did not have to implement the changes until resources become available, according to Anne Jordan, former commissioner of public safety and now a criminal process specialist for the Maine Judicial Branch.

The federal government has not provided funding, leaving the state to come up with its own system for conveying the information to the FBI, from which the NCIS draws its data. The judicial branch is doing so now.

Dealing with a backlog that developed since 2008 will involve sorting through more than 5,000 case folders spread between eight courts in Maine, Jordan said. Based on the assumption that a skilled clerk could go through five to seven folders per hour, she estimates the process will take 714 to 1,000 hours. In courts with fewer cases, existing staff could likely absorb the work. Extra help will be required for larger courts, and the judicial branch has yet to finalize a price tag for the project, she said.

The judicial branch, which learned Jan. 11 that Gov. Paul LePage’s 2014-15 budget does not include funding for its requested electronic filing system, continues to work with the Department of Public Safety, which sends the data to the FBI, to develop a system for future use. No cost estimate is available.

The backlog doesn’t mean there are more than 5,000 Mainers whose names should be red-flagged in the national database as being federally prohibited from owning firearms, Jordan said. Many of the mental health files don’t relate to people who have been “white papered,” but nobody knows how many do. At this point, the number of people who should be reported to the FBI is unknown, tucked away in files at eight courthouses scattered throughout Maine.

Robert Long is a political analyst for the BDN.