Washington (CNN) -- Gun rights and gun control advocates largely agree there should be restrictions on mentally ill people obtaining firearms. The case of Myron Fletcher illustrates how difficult it is to put that into practice.
In 2003, Fletcher lost his rights to possess firearms under Arizona law after he underwent mental health treatment. In 2012, he successfully petitioned a Pima County judge to have his rights restored.
In March, police in Tucson arrested him and charged him with murder of his girlfriend, whose decomposing body was found in his home. She'd been shot, records show.
The National Rifle Association and other gun rights groups support plans to ensure that certain mental health records, including involuntary commitment to a mental institution, are more easily searched during background checks for gun purchases.
But the NRA, along with mental health advocates, say tightening restrictions on the mentally ill could make some people reluctant to seek mental health assistance for fear of losing their rights.
The recent rampage in California, in which 22-year-old Elliot Rodger stabbed and shot to death six students near the University of California at Santa Barbara, prompted some gun-control advocates to urge more be done to keep guns out of the hands of the mentally ill.
The killer was getting mental health treatment, and his family sought the intervention of police after they became concerned that he seemed likely to hurt himself or others.
While Rodger was getting treatment, he said in a written document he sent to his psychiatrist and others, that he refused to take his prescription antipsychotic medication.
Sen. Dianne Feinstein, D-California, said after the incident, "We must ask ourselves if an individual whose family called police with concerns about mental health, who is receiving therapy and who has had several run-ins with police should be allowed to own multiple firearms and hundreds of rounds of ammunition. When anyone, no matter their mental health or history, can so easily obtain any gun they want and as many as they want — we must recognize there is a problem."
But there's widespread opposition to new gun laws in Congress, which killed proposals by the Obama administration following the 2012 Newtown, Connecticut, school massacre.
Instead, there are proposals to set new standards for mental health treatment to provide families more power to involuntarily commit a family member to mental health treatment when they refuse it themselves.
Such laws could help keep guns away from mentally ill people. Federal and state laws curtail gun rights for people who are institutionalized for mental health treatment.
Rep. Tim Murphy, R-Pennsylvania, who is sponsoring a bill to allow families emergency commitment power, said the California killings show the need for a federal standard.
"What makes these painful episodes so confounding is the reality that so many tragedies involving a person with a mental illness are entirely preventable," he said at a hearing. "For example, in 34 states Elliott Rodger's family would have been able to ask a court to order an emergency psychiatric evaluation but in California the law says they cannot. The families know when a loved one is in a mental health crisis and their condition is gravely deteriorating."
In the case of Fletcher, Pima County Superior Court Judge K.C. Stanford ruled to restore his rights after he provided letters from a doctor that indicated he was mentally fit, according to people familiar with the matter.
CNN wasn't able to review the court records because mental health records aren't public.
Stanford didn't respond to a request for comment. A court spokeswoman said the judge was prohibited from commenting on mental health matters and in cases where a defendant is subject to current charges.
David Hardy, Fletcher's attorney, said he couldn't comment on details of the case because of attorney-client privilege.
Asked if Fletcher's gun-rights restoration led to the killing, Hardy said the 2012 court ruling was "unrelated" to the murder allegation.
Of the judge's order to restore Fletcher's guns, Hardy said: "You make your best guess; sometimes you're right and sometimes you're wrong."
He added that he supports tightening restrictions on guns for the mentally ill. "If there's a section of the law that needs overhauling, it's mental health."