A replica handgun that led a Baltimore detective to shoot a boy non-fatally Wednesday would have been banned in the state of Maryland under recent legislation opposed by the National Rifle Association.

The Baltimore Police Department said the 13-year-old boy was shot around 4 p.m. EDT after being pursued by two plainclothes detectives in East Baltimore, a blighted, economically depressed section of the city.

The officers saw the boy wielding what they believed was a handgun. After the boy was shot, the detectives learned the boy had been carrying a Daisy BB gun designed to look like a Beretta 92, the civilian version of the popular Italian-made semi-automatic pistol.

An image of the replica gun posted by the Baltimore Police Department depicted the “Powerline 340” logo of the Daisy BB pistol, available online for $24.99. At a relatively short distance, this spring-air pistol could easily be mistaken for the far more dangerous handgun it’s made to resemble.

The shooting took place while Mayor Stephanie Rawlings-Blake was attending an event on the west side of the city commemorating the one-year anniversary of the riot that followed the funeral of Freddie Gray, who died from injuries suffered while in police custody. Gray's death left a stain on an already beleaguered police department. Six officers face charges in connection with Gray's death.

The boy shot Wednesday was taken to a local hospital to be treated and was expected to survive. His name was not disclosed because he is a minor. 

Fearing the shooting could spark unrest, police described the case as a legitimate law enforcement action. Police Commissioner Kevin Davis said at an urgently arranged evening news conference that there was "no reason to believe that these officers acted inappropriately in any way.”

Police brought the boy’s mother in for questioning, claiming she knew the boy left home with the air gun. It’s unclear what law the mother might have broken because Daisy air guns are legal for minors to possess and are often promoted as trainers for youth before they graduate to firearms.

Air guns are exempt from laws covering toy guns, which require bright orange colors to indicate the object is a toy. Manufacturers like Daisy are also permitted to sell air gun replicas of actual firearms without any markings that could inform officers from a distance that the gun fires BBs instead of bullets.

In February, a bill proposed by State Delegate Jill Carter of Baltimore would have banned the sale of so-called “imitation firearms” under threat of a $1,000 fine and up to a year in prison. The bill defined an imitation firearm as any “toy, device or an object that substantially duplicates or can reasonably be perceived to be a firearm or a handgun.”

The bill was lambasted by the National Rifle Association.

“This legislation is poorly drafted and short-sighted,” the pro-gun-rights group said of the bill. “It will ban the BB and pellet guns that many parents use to teach their children safe gun handling and marksmanship.”

The NRA got its way. Last month the bill was withdrawn following an unfavorable view by state senators.