AUSTIN – Texas health officials were flabbergasted late last year when they realized that, under state law, they couldn’t maintain their longstanding practice of prohibiting visitors from bringing handguns into their 10 state-run psychiatric hospitals.

For years, the policy had been among the most basic of safeguards.

“Patients in our facilities are a danger to themselves or others,” Cathy Campbell, a policy coordinator for the state hospitals, wrote in a December email. “It seems inconceivable that we would require visitors to store box cutters but allow them to bring a gun on campus.”

And yet, that had been state law for years.

The hospitals’ puzzlement -- apparent in records obtained by The Dallas Morning News -- shows how Texas gun laws are complex and often misunderstood. And it echoes past confusion over the issue, helping explain how the state ended up allowing guns in those facilities.

Lawmakers who passed gun carry laws in the 1990s don’t appear to have contemplated the scenario. Carve-outs in the law and later legislative tweaks fuzzed things. At some point, “no guns” signs were posted at those hospitals. And until last year, the setup went largely unnoticed.

Officials with the Department of State Health Services have now taken steps to mitigate the risk of a patient accessing a gun – posting signs, for example, that ask visitors to voluntarily keep guns away.

But at least one facility, Austin State Hospital, has been slow to put up the new signs -- which remain difficult to notice. And though there’s optimism that lawmakers will address the issue next year, the state remains in somewhat uncharted territory.

“It defies comprehension,” Dorthy Floyd, superintendent at Terrell State Hospital, wrote in an email in January. The News obtained the emails under the state’s open-records law after the gun policy earned international attention in January.

State-run psychiatric hospitals are just one of several government institutions re-evaluating their firearms policies these days. Private mental hospitals continue to have the right to bar guns on their property.

The measure likewise didn't change where guns could be carried. But it created an enforcement mechanism for a 2003 law that reinforced the right of gun license holders to carry handguns at most state or local government property.

That’s even though there’s wide agreement about the pitfalls. The National Association of State Mental Health Program Directors this year surveyed states to see what gun policies exist at government-run psychiatric hospitals. Utah was the only comparable one to Texas.

The concern isn’t about patients carrying guns; those committed to the hospital, voluntary or otherwise, would have any weapons removed. And officials can still prevent access to secured portions of the hospitals.

But contact with visitors – family or friends – is often considered a key part of treatment. While visits can be monitored, a patient in a visiting area might access a gun to harm themselves or others. Police are even typically asked to stow their weapons when coming on-site.

One patient safety expert tasked by the mental health directors group with analyzing the issue summed up the scenario this way: the “perfect storm.”

It’s not that lawmakers at that time ignored the connections between guns and mental health. They talked at length about what psychiatric standards should be used to determine if a Texan could be deemed unfit to carry a gun.

And it’s not that the debate skimmed over where guns should be allowed. Lawmakers discussed all manner of exemptions, including some broader amendments that could’ve covered the state mental hospitals.

But a review of several hours of debate suggests that lawmakers never specifically discussed the notion of guns in psychiatric hospitals. Instead, the Legislature settled on an exemption for hospitals “licensed under Chapter 241, Health and Safety Code.”

“The reason we did that is because of the extremely intense personal feelings that can come about the same time a trauma is occurring in those institutions,” then-Rep. Bill Carter, R-Fort Worth, said at the time.

It’s unclear how lawmakers reached that specific definition, which covers hospitals save for those run by the state. Texas hasn’t licensed it’s own facilities for decades. And that subtlety probably meant the full implications of the gun law weren’t understood.

Former Rep. Steve Wolens, a Dallas Democrat who opposed concealed carry on principle, said recently that the mental hospitals “never entered our hemisphere of thinking.”

“Who in the world would have ever thought that the Legislature would intend to allow handguns to be carried in a psychiatric hospital?” he said. “Anybody who thinks we should have guns there deserves to be in the institution.”

(The story continues after the timeline below.)

The question of where exactly guns could be banned remained a matter of debate as the law was implemented, as some -- including some government officials -- looked to trespass laws to force the issue. It was then complicated by later legislation.

A tweak in 1997 to standardize the notice that property owners must use if they want to bar guns ended up allowing government entities – including the state hospitals – to post “no guns” signs. That loophole was closed by the 2003 law. Then came the measure passed last year to give teeth to that law.

And at some point, the state hospitals' “no guns” signs went up.

State health officials insist they had that right until recently, though they offered no evidence other than that the signs were up for years. Former State Health Services Commissioner David Lakey said the issue simply never came up during his tenure, from 2007 to early last year.

“There was never really a complaint or a movement to allow guns on our campuses,” he said.

But the dilemma became apparent last year during the Legislature’s open carry debate.

The staff of Sen. Kirk Watson, D-Austin, noticed that mental hospitals weren’t covered by the carve-outs in state law as they researched another bill. Watson’s amendment to address the issue was rejected by bill sponsor Sen. Craig Estes, R-Wichita Falls.

Estes said during the session’s waning days that he didn’t want to increase or decrease the areas where licensees could carry a gun.

Estes said recently that the issue “may need need to be revisited next session,” though he added that he trusts licensees to use “common sense and good judgment wherever they go.” And some key gun rights advocates are now on board with crafting a fix.

“I personally would not oppose a bill that would make it unlawful to carry in a psychiatric hospital,” said Charles Cotton, a Friendswood attorney who’s an influential figure in Texas’ gun community.

Watson, though, recently lamented a “broken process.”“When common sense was even called to people’s attention, it was set aside,” he said.

In the meantime, the Department of State Health Services started taking a closer look at its firearms policies by last summer.

The agency reacted to the complaints law going into effect in September by ordering all of the state psychiatric hospitals to take down any “no guns” signage. But hospital superintendents were also told to keep their existing firearms policies in place.

“The important issue with the new Legislature was to remove signage,” they were told, according to notes from a September superintendents’ conference call.

A spokeswoman said that was just an interim plan. And records show that agency officials were indeed working through the fall on new policies, scouring state law and federal safety standards for guidance.

By mid-December, the reality that guns had to be allowed had become clear. Plans were announced in early January for the new voluntary compliance signs. But even then, some officials – such as Campbell, the state hospitals’ policy coordinator – seemed at a loss.

“Licensed hospitals are a specific exemption under the law,” she wrote in an email. “It is not much of a stretch to include our hospitals that serve the most psychiatrically-involved patients.”

The agency has since taken other steps, making use of a carve-out to ban guns in on-campus buildings that house courts. The new signs have apparently gone up, though it took a reporter noticing last week that there wasn’t one at Austin State Hospital for one to be posted there.

A spokeswoman said they’ve heard of only one instance of a visitor wearing a visible gun at one of the hospitals – and that he complied when asked by staff to leave it in his car.