Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

The U.S Supreme Court Monday wiped out a Massachusetts court ruling that had upheld the conviction of a Massachusetts woman who carried a stun gun for protection from an abusive former boyfriend.

The ruling cast doubt over a handful of state bans on possessing Tasers and other kinds of stun guns.

Jaime Caetano argued that the state's ban on allowing individuals to possess stun guns violated her Second Amendment right to carry a weapon for self defense.

She was arrested in Ashland, Massachusetts in 2011 after police officers, investigating a supermarket's complaint about possible shoplifting, found the weapon in her purse. She told them she needed it to fend off a former boyfriend who was abusive.

The Taser X2 electronic weapon is displayed for a photograph at the Taser International Inc. manufacturing facility in Scottsdale, Arizona, U.S., on Wednesday, April 22, 2015. Taser International Inc. is scheduled to release earnings figures on April 30. Patrick T. Fallon / Bloomberg via Getty Images file

A Massachusetts law bans possession of the weapons by all but police officers. The state supreme court upheld her conviction, ruling that Tasers were not the kind of weapons the founders meant the Second Amendment to cover.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

But in an unsigned opinion, the U.S. Supreme Court Monday vacated that ruling. It said the Massachusetts court improperly found that Second Amendment protection applies only to weapons that were in common use at the time of the nation's founding.

Referring to its landmark 2008 ruling on handguns in the home, the justices said the Second Amendment applies "to all instruments that constitute bearable arms," even those not in existence at the time of the founding.

Related: What Does 50,000 Volts From a Taser Do to Your Brain?

Caetano had argued that the Massachusetts Supreme Court's conception of the amendment, "as a sort of fossilized relic trapped in amber," was wrong. A stun gun, she said, is an instrument designed for self defense, so that the state's ban on possession violated the U.S. Supreme Court's 2008 ruling that said the Second Amendment protects the right to keep a handgun at home for self defense.

Lawyers for the state had urged the justices to let her conviction stand. Citing the Supreme Court's 2008 ruling, prosecutors said the Second Amendment "does not protect those weapons not typically possessed by law-abiding citizens for lawful purposes." It applies only to the kinds of weapons "in common use at the time'" the amendment was ratified.

The court's action Monday was a departure from what had become a pattern involving challenges to gun laws. Since its 2008 ruling, and a subsequent one clarifying that the rule applied nationwide, the court had consistently turned away invitations to expand the ruling to cover weapons outside the home.

Related: Georgia Considers Stun Guns On Campus

What's more, Monday's ruling came without Justice Antonin Scalia, the court's most outspoken advocate of gun rights at the author of the 2008 opinion.

Justices Samuel Alito and Clarence Thomas called Monday's ruling "grudging," presumably because it did not categorically declare bans on stun guns unconstitutional, though it came close to doing so.

"If the fundamental right of self defense does not protect Caetano, then the safety of all Americans is left to the mercy of state authorities who may be more concerned about disarming the people than about keeping them safe," Alito wrote.

Monday's ruling sends the case back to Massachusetts for another round in court.