BOSTON — Massachusetts residents are increasingly arming themselves with electronic weapons following a court ruling last year that legalized the non-lethal devices.

More than 1,500 electronic Tasers and stun guns have been sold by gun dealers in Massachusetts since July 2018, according to the state Executive Office of Public Safety and Security.

Last year, state lawmakers legalized stun guns by adding them to a list of regulated weapons, which means owners will must get a state firearms license to own one.

The changes, tucked into a 'red flag' bill signed by Gov. Charlie Baker, came in response to a 2018 Supreme Judicial Court ruling that the state's ban on stun guns was unconstitutional.

Rules for ownership and use of the weapons, including penalties for having one without a firearms license, are still being worked out by state regulators. But consumers who previously had to buy them online, or travel to states like New Hampshire to get one, clearly aren't waiting.

Jim Wallace, executive director of the Gun Owners Action League, said electronic weapons are an option for people who prefer a non-lethal way to defend themselves.

"It allows someone who isn't comfortable with a firearm to carry something for self-defense, just like pepper spray," he said.

When fired, Tasers shoot two spear-shaped probes that penetrate the skin. Copper wires attached to the probes emit a 50,000-volt shock of electricity, forcing muscles to seize and usually sending the person collapsing to the ground. Other stun guns must touch an individual's skin or clothes but also deliver a debilitating shock.

Wallace said most people seem to prefer hand-held stun guns as opposed to Tasers, which are more expensive and complicated to use.

Many people may not realize they're legal, he said.

"They've been illegal for so long, I'm not sure the general public even knows you can own them now," he said.

He said the requirement to get a firearms license is "ridiculous and unnecessary" and the law itself full of technical issues.

"They never should have classified it as a handgun," he said. "In most states this is something you can buy over the counter, without a permit."

Previously, the state limited the use of stun guns to police officers.

Law enforcement officials, who once opposed efforts to legalize stun guns, aren't raising any concerns about their growing popularity.

"From a police perspective, I'd certainly rather face one of those than a handgun," said Mark Leahy, executive director of the Massachusetts Chiefs of Police Association.

But he said people who purchase them should be aware of the potential downsides.

"They need to be cognizant of the fact that any of these things can be potentially taken away by someone, and used against them," Leahy said.

Another issue for law enforcement is that most stun guns don't have serial numbers, like other weapons, making them difficult to trace if used in crimes.

Police are increasingly using stun guns to subdue unruly suspects, a tactic questioned by civil liberties groups but touted by law enforcement as more humane than other types of force.

Massachusetts police agencies reported 1,339 incidents of police using Tasers or stun guns in 2017 — an increase of nearly 60% from 2012.

Statewide 275 police agencies are authorized to use electronic control weapons, and 7,481 such weapons were in use in 2017.

Overall, the number of firearms sold in Massachusetts -- including hand guns, rifles and shotguns -- has declined from 129,079 in 2016 to 95,216 in 2018, according to state data.

Massachusetts has some of the nation's toughest firearms laws, which have been tightened in recent years in response to gun violence at home and mass shootings elsewhere.

The state's "red flag" law also requires stun guns to be stored in a "locked container" that can only be opened by the operator.

Besides Massachusetts, stun guns are legal in 42 states including New Hampshire, Vermont, Maine and Rhode Island, according to the National Conference of State Legislatures. In most cases, owners must be at least 18 years old and not have a felony record.

Christian M. Wade covers the Massachusetts Statehouse for North of Boston Media Group’s newspapers and websites. Email him at cwade@cnhi.com.

Recommended for you