PHOENIX - Guns in public buildings are just a Jan Brewer signature away from being legal, for the second time in two years.

On a 19-11 vote, the Senate on Thursday approved overriding existing laws that say governments need only to post a sign at the entrance of a public building to make it illegal for visitors to enter when armed.

HB 2729 would still allow government agencies to keep their buildings off-limits to guns, but only if they install metal detectors and armed guards at all entrances.

The vote sends the bill to the governor, who vetoed a similar measure last year.

But Brewer, who has pronounced herself a strong proponent of the Second Amendment right to bear arms, said that veto was not because she was against the concept. Instead, the governor said the wording was flawed and could cause potential confusion about exactly where people could and could not bring their weapons.

Rep. David Gowan, R-Sierra Vista, who is the sponsor of the new version, said the wording has been altered to address Brewer's concerns.

The legislation also does not include public schools or college campuses.

At the heart of the issue are arguments that the current law about posting buildings as gun-free zones is meaningless because the only people who obey the signs are those who comply with the laws. That, said Gowan, leaves them defenseless against those who ignore the signs.

That theme was echoed by Sen. Al Melvin, R-Tucson.

He said society is divided into three groups: unarmed sheep, armed sheepdogs and wolves, who are the bad guys.

"It takes sheepdogs to protect the sheep from the wolves," Melvin said. He said that is why Arizona needs more people who have permits to carry concealed weapons.

"With this type of legislation, we have a safer society," he said.

The problem, said Sen. Olivia Cajero-Bedford, is the cost. She said governments that do not want armed visitors roaming the halls will have to spend millions buying the equipment and additional millions staffing entrances.

Maricopa County alone estimated having to spend $11.3 million on equipment and $19.5 million in ongoing costs.

All that left Sen. Steve Smith, R-Maricopa, unimpressed.

"As far as I'm concerned, there is no cost too high to protect my constitutional rights," he said, reciting part of the Second Amendment right to bear arms.

And Sen. Andy Biggs, R-Gilbert, pointed out the Arizona Constitution has even broader language, saying the right of a citizen "to bear arms in defense of himself or the state shall not be impaired." He suggested any restrictions, including those HB 2729 seeks to overturn, are probably illegal anyway.

"If you want to change the constitution to provide for more draconian regulation on gun ownership and carrying of guns, open or concealed, my opinion is you have to change … the constitution," Biggs said. "We haven't done that."

But Sen. Steve Gallardo, D-Phoenix, said this measure has nothing to do with constitutional rights.

"This type of legislation would open up the doors for having our public facilities in a dangerous area," he said. "We're now allowing firearms in public facilities that should not have them, public swimming pools, public libraries."

Sen. Sylvia Allen, R-Snowflake, said she's not worried about people carrying guns.

"The gun is not the problem," she said.

"I would ask, does a spoon make a person fat?" Allen continued. "Is the pen responsible for the words that are written?"

Allen said restrictions on guns are based on an assumption that those who are armed "are just going to randomly take it out and start shooting and carrying on because that gun somehow has the power just to change them and make them do something really terrible and bad."