Fifteen years, $5 million and more than 300,000 shell casings later, Maryland has shut down a controversial database meant to help solve handgun crimes in the state, agreeing with critics that it was a waste of time and money.

Not unlike the long-gun registry debate in Canada, legislators in Maryland debated the usefulness and cost-effectiveness of the database for years, and those opposed to it tried repeatedly to shut it down. They argued it was burdensome to gun dealers and manufacturers and did little to solve gun crimes.

Previous efforts to kill the database failed but a bill to repeal it was successfully passed in the last legislative session and took effect Oct. 1. Gun dealers, the National Rifle Association and other pro-gun organizations celebrated the database's demise much like some gun owners in Canada rejoiced when the long-gun registry was scrapped in 2012.

"It was a pain in the rear," according to Jim Howdyshell, owner of Continental Arms, a gun store and shooting range in Lutherville-Timonium, Md. "It was a waste of time and effort."

The Maryland Shell Casing Reference Database was launched in 2000 as part of a package of gun-related laws. It mandated that handgun manufacturers had to fire a test bullet and then put the shell casing in a small envelope in the gun's box before shipping it off to a seller. Once the handgun was sold the dealer had to send the shell casing to the Maryland State Police's forensic sciences division, which maintained the database.

Each envelope was given a bar code and information about the shell casing — including the make and model of the gun it came from, its serial number and when it was test fired — was entered in the database. Then a ballistics imaging system created a digital record or "fingerprint" of each shell casing. When a bullet is fired, the gun it is shot from etches unique markings on the casing.

Database failed to work as intended

In theory, a shell casing recovered at a crime scene could be cross-referenced with the database to help investigators learn, for example, what kind of handgun it came from and where it was sold. However, it failed completely In practice.

Each box contains about 150 envelopes with at least one shell casing inside of it. Maryland State Police have been authorized to sell the casings for scrap metal, but they have not decided what to do. (Meagan Fitzpatrick/CBC News) "Unfortunately, the database did not work as it was originally intended to work," said Greg Shipley, spokesman for the Maryland State Police, as he gave CBC a tour of where the shell casings are now stored. "There were no direct hits on those shell casings that were entered into it during the entire existence of the database."

There were 26 "backdoor hits" that helped in some cases but in those instances the database was only useful because investigators already knew what kind of gun they were looking for or had it in their possession.

The imaging portion of the database was dysfunctional. The software would sometimes supply hundreds of images when a shell casing image from a crime scene was searched for a match. Police stopped taking the digital photos of each casing in 2007. But the law remained on the books and manufacturers and dealers were still legally required to send the tiny manila envelopes to the police.

Over the course of the last 15 years more than 304,000 casings were collected. CBC News got a look at where they are stored at Maryland State Police headquarters in Pikesville, about a 20-minute drive from Baltimore.

Casings could be sold for scrap

The storage rooms are underground in an old fallout shelter where the floors are dirty and the air smells stale and musty. Three connected rooms behind a locked door are filled with piles of small, cardboard boxes haphazardly stacked from floor to ceiling. Several filing cabinets are also filled with the envelopes.

What to do now with all these shell casings?

Stacks of boxes containing thousands of shell casings fill three underground storage rooms in a building at Maryland State Police headquarters. (Meagan Fitzpatrick/CBC News) The police force has been authorized to sell them for scrap metal, but Shipley said their fate is still under discussion.

"We are maintaining them for the time being," he said. "We don't want to be hasty in our decisions."

They are inclined to hang on to them, in case they could be used for more backdoor hits, but Lawrence Keane, senior vice-president of the National Shooting Sports Foundation, said in a phone interview that for the good of the taxpayer, the casings should be sold.

His group represents more than 12,000 gun manufacturers, retailers and other related businesses across the United States, and they pushed for the database to be scrapped, along with the one that New York State launched the same year as Maryland. New York shut its database down in 2012 after concluding theirs wasn't working, either .

"It proved to be very costly and inefficient," Keane said about the handgun database. "We would describe it as a policy that was pursued by gun-control groups in the United States who always seem to find some new technology that they view as the panacea for gun violence."

At Continental Arms, a short drive from Maryland State Police headquarters, dozens of handguns are for sale along with other firearms and supplies. (A licence is required to purchase a handgun in the state of Maryland.) The store's owner viewed the database as a masked way to put a dent in the gun business because of the expenses incurred to comply with the law.

Howdyshell is happy to see it gone. "It was a useless law," he said.