It's every police chief's worst nightmare: An officer takes a gun off the street only for it to end up in the hands of another criminal.

Increasingly, departments are being encouraged -- and even required -- by state laws to sell the guns they confiscate instead of destroying them, sparking concerns that this scenario could be more likely.

The National Rifle Association, a vocal supporter of these laws, says the fear that a seized gun will get back into the hands of criminals is unwarranted since police departments take precautions to ensure that guns are sold to legal buyers.

But these safeguards aren't always foolproof. While a federal law makes it impossible to figure out how often these guns are ending up in the hands of criminals, CNNMoney identified four cases where this worst-case scenario happened.

1. Two police officers ambushed outside Pentagon

John Patrick Bedell never should have been able to get his hands on a gun. But In March 2010, he walked up to a Pentagon security checkpoint carrying a handgun and shot two Pentagon police officers as he approached the building.

Officers returned fire and Bedell, 36, was fatally injured. Both officers were successfully treated for their gunshot wounds. Bedell died later that night.

The gun Bedell used in the shooting had previously been seized by the Memphis Police Department and then later sold or traded, according to an FBI spokesperson.

It's unclear how the gun ended up with Bedell, who was prohibited from owning a gun because of mental health issues, according to federal investigators of the Pentagon shooting. They believe Bedell may have bought the gun from someone outside a gun show without a background check. But there's no way to know for sure.

"What we do know is Bedell would not have been able to purchase this weapon legally," said Andrew Ames, a spokesperson for the FBI, which investigated the case. "If anyone had run a federal gun check on him, they would not have been able to sell him that weapon."

Related: New laws force police to put guns back on the streets

At the time, Memphis Mayor A C Wharton, Jr. told a local CNN affiliate that he would review the city's policy of trading in seized guns. "I just don't want our city having any role in getting a confiscated gun back on the streets," he said.

Yet, Wharton says the city has continued to trade confiscated firearms in exchange for new equipment. In a statement to CNNMoney, Wharton said the city views the sale or trade of seized guns as a "necessary evil" and noted that it has saved the police department more than $2.7 million on equipment in the last few years. He did not comment directly on the Pentagon shooting.

2. One killed, one injured inside Las Vegas Courthouse

Only a few months before the Pentagon ambush, a shooting with another gun sold by Memphis-area law enforcement had an even more tragic outcome.

Early one January morning, 66-year-old Johnny Lee Wicks Jr. entered the federal courthouse in Las Vegas armed with a shotgun.

Wicks fired multiple rounds inside the lobby of the building, killing 72-year-old security officer Stanley Cooper and wounding a U.S. marshal. Wicks was killed by federal law enforcement as he tried to escape. It was later reported that Wicks had a lengthy criminal history, including arrests for drug charges and murder.

Cooper was a retired police officer, and the city of Las Vegas has since named a street in his honor. He was also awarded with a Purple Heart.

Related: Family of Pentagon shooting victim denied benefits

"He was a hero," said his son Marshall Cooper in an interview with CNNMoney. He recounted how his father had shielded a court employee from gunfire even after he was shot in the chest. Cooper said his father had spent more than four decades in law enforcement and had no plans to stop working, even though he was the oldest security officer at the courthouse.

In the wake of the shooting, the Shelby County Sheriff's Office in Memphis confirmed that the shotgun had been seized as part of a criminal case and sold to an out-of-state gun dealer. The sheriff's office said at the time that a judge had ordered the sale. The chain of events that resulted in Wicks ultimately gaining possession of the gun is unclear.

3. Two police officers shot at a New Hope, Minnesota City Council meeting

Despite a long history of arrests, mental illness and known threats against authorities, 68-year-old Raymond Kmetz was still able to buy three shotguns last year.

He used one of them, a Stoeger 12-gauge shotgun, when he stormed into the City Hall of New Hope, Minnesota this January and opened fire, hitting two police officers outside the City Council chambers.

One of the officers who was shot had just been sworn into the department, and the other was a veteran officer. Hearing the gunshots, city council members at the meeting dove for cover as police officers shot back to keep him from getting any closer, as can be seen in video footage.

Both officers survived their injuries, but Kmetz was killed.

An investigation revealed that Kmetz had bid on the Stoeger, along with two other guns found in the trunk of his car, at an online auction of weapons that had been previously seized by the Duluth Police Department.

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

Because Kmetz couldn't pass a background check, the guns were picked up by a friend in what federal authorities say was an illegal straw purchase. That friend pleaded guilty and was sentenced to a year in prison, and the Duluth Police Department told CNNMoney it has suspended any future gun sales for the time being.

"It doesn't get any worse than what happened in this case," said Hennepin County Sheriff Richard Stanek, who oversaw the investigation of the shooting.

NRA spokesperson Jennifer Baker said that while the case was tragic, a straw purchase is illegal and could have happened with a gun purchased anywhere, and she added that a rare example like this should not stop departments from selling seized guns.

4. Guns sold by Bremerton, Washington police officer found at multiple crime scenes

In another troubling case, a police officer was behind a scheme that resulted in multiple guns ending up in the hands of criminals.

Roy Alloway, a longtime police officer and drug detective, was charged with illegally selling more than 700 guns. Many of these guns had been seized by local law enforcement agencies, including the drug task force he worked for. He would allegedly wait until the guns were sold by the police department to a dealer, and then purchase them in bulk to resell at gun shows to anyone who had the money.

"He knowingly permitted hundreds of firearms to enter the stream of commerce without conducting a background check on a single purchaser, nor engaging in any other safeguard that the law attempts to place on these instruments of death," federal prosecutors said in court documents.

Prosecutors also said that many of the firearms he purchased and sold were inexpensive guns "favored by street criminals." These included semi-automatic rifles and handguns.

Alloway was sentenced to two years behind bars in 2012 for unlawful dealing in firearms and filing a false income tax return. Alloway, who is now out of prison after serving almost a full sentence, told CNNMoney he strongly disputes the government's claims despite his guilty plea.

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

He says he was unfairly singled out, claiming he sold guns to qualified buyers, just like many other sellers at gun shows. He is emphatic that he never sold a gun to a criminal.

But even if Alloway didn't sell directly to criminals, investigators have traced guns he sold to a variety of crimes, including multiple assaults. Meanwhile, two guns he sold ended up with felons who were stopped by police.

Not all of the guns Alloway sold had previously been seized by police. But at least one was later used in a crime -- a 2008 Seattle carjacking where a victim was held at gunpoint -- can be directly linked back to a police department sale.

Related: Government destroys millions of dollars' worth of guns

"It is unthinkable that he cared more for his pocketbook than the public good, and that he used his position as a police officer to cycle guns back on to the street," U.S. Attorney Jenny Durkan said in a statement at the time.