A U.S. Appeals Court has upheld Massachusetts Attorney General Maura Healey’s interpretation of the state’s assault weapons ban.

Healey called it “a defeat for the gun lobby and a victory for families across the nation.” “Once again, the courts have agreed that the people of Massachusetts have the right to protect themselves, their communities, and their schools by banning these deadly weapons,” Healey said in a statement.

Jim Wallace, executive director of the Gun Owners’ Action League, one of the groups that brought the case, said the gun owners have not yet decided whether to appeal to the U.S. Supreme Court.

The 29-page decision was written by First Circuit Appeals Court Judge Bruce Selya and released Friday.

The litigation stems from a 2016 decision by Healey to reinterpret the state’s assault weapons ban to ban additional guns that are “copies” of assault weapons. Massachusetts gun owners challenged the ban in court.

A U.S. District Court judge ruled in favor of Healey in April 2018.

The appeal was based on whether Healey’s ruling infringes on the Second Amendment rights of gun owners. The court said that question hinges on whether assault weapons and large capacity magazines are commonly used for lawful purposes, like self-defense.

According to court filings, nearly 5 million Americans – or 1 percent of Americans - own a semiautomatic assault weapon.

Selya wrote that the record is “sparse” as to their use for self-defense, and concluded that Healey’s ban “does not heavily burden the core right of self-defense in the home.”

Selya wrote that their use does implicate public safety, since these guns can shoot through walls, “risking the lives of those in nearby apartments or on the street.” Semiautomatic weapons can be used to fire multiple rounds quickly, hitting more victims in a shorter time. Large capacity magazines let a shooter shoot more rounds before stopping to reload. These types of guns cause also greater damage to victims.

The court wrote that semi-automatic assault weapons have been used in a number of recent mass shootings. Mass shooters have frequently bought their guns legally.

The court found that the state’s compelling interest in protecting public safety is enough to justify the ban.

Retired U.S. Supreme Court Justice David Souter sat on the three-judge Appeals Court panel that decided the case.