A New York law making it illegal for members of the public to possess "electronic" arms like Tasers is facing a federal lawsuit claiming that making such possession a criminal misdemeanor is a violation of the Second Amendment.

New York, one of five states outlawing electronic weapons, is being sued (PDF) by the Firearms Policy Foundation and Matthew Avitabile—the mayor of Middleburgh, New York. Avitabile wants to purchase a Taser for self-defense. But New York Penal Law § 265.01 says, "A person is guilty of criminal possession of a weapon in the fourth degree when:(1) He or she possesses any firearm, electronic dart gun, electronic stun gun..."

The suit claims the New York law is unconstitutional, saying:

Defendants’ laws, customs, practices and policies generally banning the acquisition, possession, carrying and use of Tasers and other electronic arms violates the Second Amendment to the United States Constitution, facially and as applied against the Plaintiffs in this action, damaging Plaintiffs in violation of 42 U.S.C. § 1983. Plaintiffs are therefore entitled to preliminary and permanent injunctive relief against such laws, customs, policies, and practices.

New Jersey is also facing a similar lawsuit in an era when all manner of weapons are being constructed at home with 3D printers.

The New York suit, meanwhile, comes nine months after the US Supreme Court questioned the rationale behind a Massachusetts law outlawing stun guns and a Massachusetts state top court ruling supporting that law.

The decision set aside a 2015 ruling from the Judicial Court of Massachusetts, which upheld the law that carries up to 2.5 years in prison. The state's top court had ruled that the US Constitution's framers never envisioned the modern stun-gun device, first patented in 1972. The state court also said that stun guns are not suitable for military use and that it did not matter that state lawmakers had approved the possession of handguns outside the home.

The Supreme Court, however, didn't hold that the Massachusetts law was unconstitutional. Instead, the Supreme Court sent the case back to the Massachusetts high court to reconsider its analysis because the reasoning of the lower court's ruling violated US Supreme Court precedent.

But Massachusetts subsequently dropped its prosecution of a woman at the center of the case who brought a legal challenge against the stun-gun possession charges levied against her. That, in essence, ended the case and left the Massachusetts law on the books, "though with a cloud over it as a result of the Supreme Court's decision," as the Washington Post wrote.

The Supreme Court precedent the Post was referencing was a 2008 decision known as Heller (PDF). The ruling overturned a District of Columbia firearms law and concluded that a "ban on handgun possession in the home violates the Second Amendment, as does its prohibition against rendering any lawful firearm in the home operable for the purpose of immediate self-defense."

In the wake of Heller, every state allows people to carry weapons of sorts, some with or without permits. But a handful of states view stun guns differently and bar civilians from having them. Heller rejected the proposition that "only those weapons useful in warfare are protected." The Supreme Court, in its stun-gun ruling earlier this year, said the Massachusetts high court's reasoning was flawed because the Second Amendment extends to weapons "not in existence at the time of the founding."

The New York suit cites Heller and claims that New York "may not completely ban the keeping and bearing of arms for self-defense that are not unusually dangerous, deny individuals the right to carry arms in non-sensitive places, deprive individuals of the right to keep or carry arms in an arbitrary and capricious manner, or impose regulations on the right to keep and carry arms that are inconsistent with the Second Amendment."

The suit added that stun guns are less lethal than firearms and that 18,000 law enforcement agencies deploy them worldwide.