The man who killed two women at a Louisiana movie theater last week was able to buy a firearm legally — despite a judge’s order sending him to a psychiatric hospital in 2008 — because he was never involuntarily committed for treatment, Georgia officials said Monday.

An involuntary commitment would have banned John Russell Houser from buying a firearm under the federal gun law that strengthened state reporting requirements after a mass shooting at Virginia Tech in 2007. But Houser never reached the crucial stage of having a judge rule on his mental competence, a process called adjudication, which is required before someone can be involuntarily committed to a psychiatric facility, officials said.

“If he had been adjudicated in need of involuntary treatment, I would have reported that to the Georgia Bureau of Investigation, who would then send it to the FBI,” said Muscogee County Probate Judge Marc E. D’Antonio, who was chief clerk at the time in the county that would have handled the case. “I clearly would have known. That did not happen.”

What did happen remains unclear. A state health official declined to say whether Houser was released from the West Central Georgia Regional Hospital or whether he voluntarily agreed to remain there for treatment. Mental health records are not open for public review.

Either way, Houser’s purchase of a .40-caliber semiautomatic handgun at a pawnshop in Phenix City, Ala., last year was legal. Houser, 59, killed himself after the rampage on Thursday in Lafayette, La., that left two dead and nine injured.

From Columbine to Charleston, here's a look at some of the most notable U.S. mass shootings. (Alice Li/The Washington Post)

Gun-control advocates say the case exposes a gap in the nation’s firearm laws. In trying to strike a balance between protecting the public and protecting the rights of people with mental illness, federal lawmakers specified that people merely taken for psychiatric evaluation — as Houser was — should retain their right to buy guns.

Georgia officials appear to have followed that provision. However, procedures for defining and adjudicating involuntary commitments, along with what the law calls “mental defectiveness,” can vary from state to state. Federal authorities have acknowledged that the provision has left officials in many states confused about what should be reported.

Last year, the Justice Department proposed rewriting the rules to make the process clearer. That proposal confirms, however, that temporary admissions for observation do not disqualify someone from buying a firearm unless those brief stays are later adjudicated as “formal commitments.”

“There’s definitely an opportunity to improve the extent to which mental health records are put into the system,” said Dan Gross, president of the Brady Campaign and Center to Prevent Gun Violence, which is pushing Congress to provide an extra $400 million for states to submit more records to the federal system, as well as expand background checks to online sales and gun shows.

Advocates for the mentally ill argue that toughening that standard might discourage people from seeking treatment for fear of losing freedoms and rights, including the right to own guns. On its Web site, the National Rifle Association says it “will support any reasonable step to fix America’s broken mental health system without intruding on the constitutional rights of Americans.”

Adam Winkler, a law professor at the University of California at Los Angeles and an expert on the Second Amendment, called the current standard “vastly under-inclusive” but said that “it’s difficult to know how, exactly, we might strengthen the rule” while respecting due process rights.

“We probably don’t want to have a rule that anyone who gets counseling in any shape or form is prohibited from exercising a constitutional right,” Winkler said. On the other hand, he said, “there are too many people that are sick and are getting their hands on guns and doing a lot of damage.”

Houser’s case highlights the sometimes porous nature of the federal background-check system, with lapses and gaps that can have tragic consequences. Earlier this month, FBI Director James B. Comey said Dylann Roof, who is accused of killing nine people at a historic black church in Charleston, S.C., in June, was able to buy his gun because the system did not capture his arrest on drug charges.

In 2012, a Wisconsin man killed his wife and two of her co-workers after buying a gun online, where there was no background check to note that his wife had a restraining order against him, something that automatically disqualified him from gun ownership.

And in 2007, the man who killed 32 people and injured 17 others at Virginia Tech, the nation’s worst mass shooting, passed a background check even though a judge had deemed him a danger to himself.

The Virginia Tech gunman, too, had never been formally committed to a mental hospital. Instead, a judge ordered him to seek outpatient treatment. Two weeks after the shooting, then-Gov. Timothy M. Kaine (D) signed an executive order blocking gun sales to anyone court-ordered to receive involuntary mental health treatment of any kind. A year later, Virginia lawmakers made it easier for judges to force someone into treatment.

Today in Virginia, if a mental health professional finds someone to be a threat, “they’re going to involuntarily commit you,” said Corinne Geller, spokeswoman for the Virginia State Police. “That committal is what, by state law, gets sent to us, and we upload to” the National Instant Criminal Background Check System.

However, as in Georgia, a temporary order for a mental health evaluation does not trigger an alert, Geller said.

Houser’s brush with institutionalization came in the spring of 2008, when he showed up unannounced in the small town of Carrollton, Ga., and barged into his daughter’s office to angrily object to her upcoming wedding.

In a petition for a temporary protective order, Houser’s family members called it an ominous scene and the latest example of his “volatile mental state.” His wife was so worried that she removed all guns and other weapons from their home, according to court filings. Years before, Houser had been accused of arson and domestic violence, separate records show, although he was never convicted.

After the Carrollton incident, a Carroll County probate judge signed an “order to apprehend” Houser, and sheriff’s deputies whisked him away to West Central Georgia Regional Hospital in Columbus. He told his wife that once he got out of West Central, he would continue to try to stop his daughter’s wedding, the attorney wrote.

Standard procedure in Georgia would have given doctors at West Central up to a week to examine Houser and decide what to do with him. Their options would have been to release him, to try to persuade him to be admitted for treatment or to petition the local probate judge in Muscogee County to involuntarily commit him.

Neither Muscogee County nor state authorities in charge of submitting data to the federal background-check system could find any evidence that Houser was involuntarily committed.

“We did not receive an involuntary commitment order on Houser, because there was no order,” Sherry Lang, deputy director of public affairs for the Georgia Bureau of Investigation, said Monday.

When Houser was admitted to West Central, the hospital was under federal investigation of the “conditions and practices” of Georgia’s state-run psychiatric hospitals. The inquiry would later lead to a settlement between Georgia and the federal government.

The Justice Department documented significant “deficiencies” in the level of care provided to patients, including concerns about safety as well as the proper treatment and discharging of patients. Even the admissions process, a crucial step in screening patients, had “substantially departed from generally accepted professional standards,” investigators wrote.

In the summer of 2008, one patient assaulted and killed another patient within West Central. The dying patient waited more than 50 minutes for an ambulance.

That fall, a patient was found naked on the hospital floor, covered in his urine. Although he displayed no signs of psychosis, he was treated with antipsychotic medication and later died of blunt-force trauma to his spleen. Investigators found that the hospital’s internal review did not investigate how the patient sustained such trauma.

A spokesman from the state Department of Behavioral Health and Developmental Disabilities, which oversees West Central, declined to comment on the length of Houser’s stay there.

Law enforcement sources said it’s common for patients to be discharged from Georgia psychiatric hospitals after brief periods of evaluations. Howard Sills, the sheriff in Putnam County, southeast of Atlanta, said he has dropped off countless mentally troubled people, only to see them quickly released.

“I do believe in the Second Amendment,” Sills said. “But I also do believe that people who have been committed in these situations that we’re talking about right now should not be allowed to possess firearms.” He added, “Some of these people we deal with, they shouldn’t have a pocket knife, much less a gun.”

At an annual convention for Georgia sheriffs, which is taking place this week at Jekyll Island on the Georgia coast, Sills said discussion of mental health problems always generates high interest.

“Our state mental health system doesn’t work,” he said.

Kovac is a freelance writer. Mark Berman, Alice Crites and Julie Tate in Washington contributed to this report.