Taser International displayed a model at an exhibition in January 2012 in Las Vegas, Nevada. (Photo by Ethan Miller/Getty Images) (Ethan Miller/GETTY IMAGES)

Gun rights advocates have asked a federal court in Washington to strike down the District’s ban on stun guns, taking a cue from a March ruling by the U.S. Supreme Court that suggested possessing stun guns and electronic weapons is protected by the Second Amendment.

Three city residents, identified in a 17-page lawsuit filed Tuesday as a conservative blogger, a nurse who sometimes works at night and an armed-robbery victim, said the D.C. law violates their constitutional right “to arms for self-defense that are not unusually ­dangerous.”

“The Supreme Court has clearly stated that the Second Amendment is not limited to guns. It extends to all arms commonly possessed and used for ­self-defense,” said their attorney, George L. Lyon Jr., a D.C. resident and Arlington lawyer.

Lyon is a firearms instructor who was a plaintiff in a landmark 2008 Supreme Court case that struck down the city’s long-standing ban on handguns and a later case that voided a ban on carrying weapons outside the home.

He said that “the Taser ban is a remnant of D.C.’s anti-self-defense mind-set that the Supreme Court rejected” in the 2008 D.C. case, known as the Heller case. “It’s time for it to go.”

The lawsuit was assigned Wednesday to U.S. District Judge Randolph D. Moss.

Robert Marus, a spokesman for D.C. Attorney General Karl A. Racine (D), said: “As with other newly filed litigation against the District, we can’t comment on this suit at this time.”

The lawsuit comes after the Supreme Court released an unsigned, five-paragraph unanimous ruling March 21 in a stun gun case out of Massachusetts. The state’s highest court had upheld a ban on possessing the weapons, but that decision was overturned by the Supreme Court.

The Supreme Court did not strike down the ban but rejected the state court’s reasoning that the Second Amendment didn’t apply to stun guns, saying that the Heller decision covered weapons even if they did not have a military use and were uncommon when the amendment was enacted.

Eugene Volokh, a law professor at the University of California at Los Angeles who filed a brief in the Massachusetts case, said that although the Supreme Court “left open the door” to a fuller argument over stun-gun laws, the District could face “an uphill battle” to defend its outright ban. (The professor also writes for a blog, the Volokh Conspiracy, that appears on The Washington Post’s website.)

Attorneys for the city will have to make “some strong enough showing of public safety need” to prohibit non-deadly weapons such as stun guns, when deadly weapons such as firearms are allowed, Volokh said. (The professor also writes for a blog, the Volokh Conspiracy, that appears on The Washington Post’s website.)

Regulation of stun guns has been an issue nationwide.

New York, New Jersey, Hawaii and Rhode Island and several cities ban possession of stun guns, Volokh said. States including Wisconsin and Michigan in recent years have legalized their possession by people licensed to carry concealed weapons.

Localities including Anne Arundel and Harford counties repealed stun-gun bans in 2013 and 2014 for adults who pass a background check, Volokh said.

The lead plaintiff in the D.C. case, Crystal Wright, said: “I wanted to be part of this lawsuit on principle because I have a right to bear arms.” Wright’s Conservative Black Chick blog describes her as a principal owner of a public relations firm in Northwest Washington and a ­television commentator.

Wright said in an interview that she has filed police reports and company complaints after being stalked and threatened on social media. Wright said she paid Lyon about $350 for a firearms course last year and has a pending application for a D.C. concealed weapons permit.

However, Wright said she would prefer to be able to use a Taser. As a lethal weapon, using a gun carries potential criminal, psychological, social and civil liability risks, she said. A Taser would be preferable, she said, because of what she characterized as “its proven effectiveness and its proven record of minimizing injury to suspects and/or assailants.”

The other plaintiffs in the D.C. lawsuit are Traci Dean and Brendan Turner, both of Northwest.