PHOENIX (AP) — Arizona cities and counties would have to sell guns turned in at community buyback events instead of destroying them under a law passed by the Legislature.

The bill doesn't have any effect on guns seized by law enforcement, which already have to be sold to a federally licensed dealer under a law passed last year. But that didn't stop a lengthy debate that veered into the possibility that the gun used to shoot U.S. Rep. Gabrielle Giffords might end up back on the street.

The bill is designed to eliminate a loophole in last year's law that requires police agencies to sell seized guns. Cities, including Tucson, have continued to hold buyback events and destroy the weapons, arguing that because they were voluntarily surrendered, they aren't covered by the law.

The Senate passed House Bill 2455 Tuesday on an 18-12 party-line vote and it now goes to Republican Gov. Jan Brewer for action.

Democrats argued that Republicans complain about the federal government when it requires the state to take action, yet they're quick to force local governments to do what they want.

"We hate it when the federal government mandates it to the state, and we're doing the same thing," said Sen. Lynne Pancrazi, D-Yuma. They also complained about victims having to deal with the knowledge that a gun that killed a loved one could end up back on the streets.

Republicans countered that allowing cities and counties to destroy guns that could be sold is a waste of taxpayer's money.

"It's not about protecting Second Amendment rights, it's about protecting the taxpayers," said Sen. Rick Murphy, R-Peoria. He also argued that the state doesn't require the destruction of cars involved in fatal accidents, so requiring guns to be destroyed is simply a feel-good measure that protects no one.

Murphy and Senate President Andy Biggs, R-Gilbert, pushed back at the argument against the state telling cities and counties what to do. Both noted that states retain rights not given to the federal government through the U.S. Constitution, while under the state constitution, cities and counties are subdivisions of the state.

During testimony before a House committee in February, Maricopa County Supervisor Mary Rose Wilcox said buyback programs give people who no longer want guns in their homes a safe way to dispose of them. Some are worried the weapons could be stolen, and others want to prevent a family member from accessing them, she said.

"There are many, many reasons, but they would never fathom that the guns they turn in would be recirculated again," Wilcox said.