Every year, police officers seize tens of thousands of rifles, shotguns, machine guns and other firearms from criminals across the country. While many agencies destroy these weapons, a growing number of police departments are selling them instead.

And it's not always by choice.

Since 2009, at least 11 states have passed laws that either encourage or require police departments to sell seized or recovered guns -- with some banning police from destroying guns altogether, according to an exclusive CNNMoney analysis of state laws.

Such laws used to be far less common. While it's hard to track exactly how many states have historically pushed police departments to sell seized guns, agencies in only a few states were actually forced to sell them prior to 2009. Kentucky was the first to ban the destruction of guns in 1998, a law that has served as inspiration for the recent wave of legislation.

Behind this trend are powerful special interests like the National Rifle Association (NRA), which argues that the fear of these guns getting into the hands of criminals is "absurd" and part of an anti-gun agenda. It says that by destroying guns, police departments are not only eliminating perfectly functional weapons, but also throwing away a potential source of revenue.

"Police destruction of firearms is unnecessary and wasteful," said NRA spokeswoman Amy Hunter. "There is no reason any police department can't resell those firearms to law abiding citizens and use the money for any number of things -- infrastructure, law enforcement training, equipment, etc."

But the NRA is facing unlikely opponents in their mission: some of the very police officers confiscating the guns in the first place.

"My job is to keep my officers safe," said Fred Fletcher, the police chief of Chattanooga, where there have been more than 100 shootings this year. "To send them out to face the same guns they risked their lives to get off the street is a big concern."

While some law enforcement officials support the sale of confiscated guns, a number of police chiefs like Fletcher are speaking out against the practice -- arguing that the risk of selling a gun back to a criminal far outweighs the amount of money they could make.

Some nightmare scenarios have already unfolded. CNNMoney identified at least four cases where guns sold by police departments have been used in serious crimes, including three against law enforcement officers.

Related: How this gun ended up in the hands of a criminal

In Las Vegas, a court security officer was killed and a Deputy U.S. Marshal was injured when a man stormed into the city's courthouse with a shotgun previously sold by a Memphis, Tennessee-area sheriff's office. In an even more high profile shooting, Pentagon police officers were ambushed by a mentally ill man with a handgun that had originally been confiscated and sold by the Memphis Police Department. More recently, a man who had previously threatened government officials opened fire at a Minnesota city council meeting, injuring two police officers with a shotgun that had been sold by a nearby department.

It's impossible to know just how many other crimes have been committed using guns confiscated and sold by police. Following lobbying efforts by the NRA and other gun advocates, a law was passed in 2003 that prohibits the Bureau of Alcohol, Tobacco, Firearms and Explosives from releasing a gun's sale history to the public.

'Worst nightmare'

Whether it was seized from a crime scene, taken during a routine traffic stop, found abandoned or recovered in some other way, a gun is held by police until any criminal investigation or court proceeding has taken place. After that, the police typically seek out the lawful owner of the gun, since it may have been stolen.

Many law enforcement agencies then destroy the guns, including those in major cities like Chicago, New York and Los Angeles, as well as the U.S. Department of Justice. But in some states, the law now only allows police departments to destroy nonworking, unsafe or illegal guns or, in some cases, those used in violent crimes. Meanwhile, some states allow police departments to donate seized weapons to other government agencies or retain them for their own use.

For those police departments that sell the guns, some only sell to federally-licensed gun dealers, which include everything from online gun emporiums to brick-and-mortar firearm stores. Other law enforcement agencies sell the guns directly to the public through auctions, often at a steep discount compared to what the gun would cost new from a gun store. Safeguards, such as background checks, are required. But that's not always enough.

In January, 68-year-old Raymond Kmetz entered City Hall in the small town of New Hope, Minnesota armed with a 12-gauge shotgun and opened fire. Two police officers were injured, and Kmetz was killed by police fire.

Due to a long history of arrests and mental illness, Kmetz was prohibited from buying guns, court records show. But he was still able to get his hands on three guns sold by the nearby Duluth Police Department. He did this by successfully bidding on the guns on an online auction site. He then arranged for a friend, Michael Garant, to pick the guns up from the licensed gun shop that worked with the auction site, knowing Garant could pass the required background check.

This kind of transaction, known as a straw purchase, is illegal. Garant, who pleaded guilty to making the straw purchases, was sentenced to a year in prison. Meanwhile, the Duluth Police Department told CNNMoney that it has suspended the sale of firearms "until our department develops sound strategies in keeping firearms from individuals who are ineligible to lawfully possess them."

"A gun that should have been destroyed instead was sold back to the public," said Hennepin County Sheriff Richard Stanek, who oversaw the investigation of the shooting. "This is the worst nightmare that could have happened."

Related: Four crimes committed with guns seized and sold by police

Critics of the sales say the guns sold by police are usually sold at a steep discount and are often the cheaper models favored by criminals. But the NRA counters that the discounts can actually help lower-income Americans who live in high-crime areas gain access to firearms for self-protection and that straw purchases could just as easily occur with a brand new gun.

In Kmetz's case, he got the Stoeger semiautomatic shotgun that he used in the shooting for $340, plus auction fees and sales tax. Online, similar models sell for around $500 new. Other guns sold by police departments are even more heavily discounted -- with CNNMoney finding some on sale for as much as 75% less than what they would cost new.

Sell your guns, or else

Those who support gun sales by police departments say all relevant gun laws are followed during the transactions and that sales provide a much needed boost to government budgets.

"They are selling them to law-abiding citizens, they are not selling them back to gang members or violent criminals," said Jennifer Baker, another NRA spokesperson. "The agenda [of opponents] is not to keep firearms out of the hands of criminals, but it is just to destroy firearms for the sake of destroying them because they want to get rid of all guns."

But some police departments have found gun sales to be more trouble than they're worth. After the city council in Colorado Springs voted to auction seized guns, an audit found that the auctions were "time intensive and not cost effective," since testing and preparing the guns for auction was so costly. The city has since discontinued the practice.

And critics say police departments should be the ones to decide what to do with the guns they end up with, not state lawmakers who may be influenced by special interest groups. But the NRA's Baker said she didn't know why a police department would ever want to destroy guns.

"Why wouldn't they want to sell them? I don't understand why would you not want the revenue to come back to the city," she said. "Why would you want to destroy a piece of valuable property?"

Arizona's police departments no longer have a choice. Thanks to a series of laws passed in recent years, agencies are now not only required to sell guns seized from criminals, but also those firearms taken off the streets through buyback programs (where members of the public are encouraged to turn in weapons with no questions asked). Lawmakers who supported this legislation said it would "preserve valuable property from unwarranted destruction" and keep departments from collecting guns just to destroy them, according to a statement from Arizona House Republicans.

"This will help Arizona counties, cities and towns to make the best use of this much needed additional source of revenue," Rep. Brenda Barton, who sponsored one of the bills, said in the statement.

As a result, a number of Arizona law enforcement agencies have started selling seized guns. And major departments like Phoenix have discontinued buyback programs altogether -- which had previously resulted in the destruction of thousands of guns.

"It's the right of a local community to decide that fewer guns in their community are important to them," said Arizona Senator Steve Farley, who represents the district where the parking lot shooting of Representative Gabrielle Giffords occurred in 2011.

Yet, the NRA is powerful, often rallying its millions of members to contact their representatives to support legislation that bars the destruction of seized guns. Leaked documents posted online show that it has also worked with the American Legislative Exchange Council (ALEC) -- the conservative policy group linked to Stand Your Ground laws and other pro-gun bills -- to draft model legislation that many of the recent laws requiring gun sales appear to be based on.

In Tennessee, the NRA even gave out the office phone number and email of the state's governor at the time, Phil Bredesen, urging its members to ask him to support a bill that banned police departments from destroying any confiscated weapons. Bredesen later signed the bill into law on the same day the mentally-ill man from the Pentagon shooting used a handgun sold by the Memphis Police Department to shoot two police officers.

Unlike some of his peers, Police Chief David Rausch of Knoxville said he is not opposed to Tennessee's law, noting that his department has been successfully trading guns it confiscates for decades.

Under his agency's program, confiscated guns are sold to a licensed gun dealer in exchange for equipment. That dealer then sells the guns to the general public. Rausch says the sales have saved his department tens of thousands of dollars over the years.

"[It] means I don't have to go and ask for an appropriation in order to purchase firearms for my agency when we need firearms or bullets or ballistic vests," said Rausch.

Yet other major departments in Tennessee, like Chattanooga and Nashville, have held off from selling the weapons -- instead stockpiling them. And Chief Fletcher of Chattanooga said he worries the law will ultimately leave him with no other choice but to sell these guns.

Last year, the NRA moved its focus to Kansas, where it touted the passage of a "comprehensive pro-gun bill," which included a laundry list of provisions, including a requirement that police departments sell seized guns, according to the organization's website.

Kansas City police chief Terry Zeigler has long been adamantly opposed to the sale of guns by police departments. Before the law passed, he used to take all the guns his department seized to a steel plant so they could be melted down. But since the law passed last year, Zeigler has been stockpiling hundreds of firearms in storage rooms -- and he is quickly running out of space.

"We're wrestling with what to do," said Zeigler. "I have not changed my position at all, however the laws have changed and we are police officers and we are going to follow the law."

Related: Police chiefs: 'Don't make us sell these guns'

Once he can't cram any more guns into storage, Zeigler plans to sell them to a gun dealer (which he is in the process of selecting).

Initial projections show the department will bring in $75,000 to $125,000 a year on the sales -- much lower than he had hoped. These funds will go toward new equipment for his officers, he says.

Should Zeigler's or any police department fail to heed these new laws, they risk going head to head with the NRA.

In Tucson, for example, an NRA official threatened to sue the city when it said it planned to destroy guns from a buyback program, which the NRA said violated the law. The 2013 buyback had been held on the two-year anniversary of the shooting that killed six people and gravely wounded Representative Giffords.

In the wake of this controversy, Arizona lawmakers passed an even stricter law ensuring guns sold in buybacks could not be destroyed, and the NRA did not move forward with a lawsuit. Tucson has not since held any buyback events.

It's this kind of influence that critics find particularly alarming.

"What's really concerning is the political power of some of these groups that at end of the day are more focused on getting guns on the streets than getting them in the right hands," said Austin, Texas Police Chief Art Acevedo.

What do you think? Send us your reactions, experiences or other story ideas to investigate here or email us at CNNMoneyInvestigates@cnn.com.