BOSTON -- A federal judge dismissed a lawsuit challenging Massachusetts' ban on assault weapons and large-capacity magazines, saying in a ruling released Friday that the weapons fall beyond the reach of the Second Amendment. U.S. District Judge William Young said assault weapons are military firearms and aren't protected by the constitutional right to "bear arms." Regulation of the weapons is a matter of policy, not for the courts, he said.

"Other states are equally free to leave them unregulated and available to their law-abiding citizens," Young said. "These policy matters are simply not of constitutional moment. Americans are not afraid of bumptious, raucous and robust debate about these matters. We call it democracy."

Democratic state Attorney General Maura Healey said the ruling "vindicates the right of the people of Massachusetts to protect themselves from these weapons of war."

Get Breaking News Delivered to Your Inbox

"Strong gun laws save lives, and we will not be intimidated by the gun lobby in our efforts to end the sale of assault weapons and protect our communities and schools," she said in a statement. "Families across the country should take heart in this victory," she said.

Young's decision comes as AR-15 assault-style rifles are under increased scrutiny because of their use in several recent mass shootings, including the February massacre at a Florida high school that left 17 people dead.

The Gun Owners' Action League of Massachusetts and other groups that filed the lawsuit argued that the AR-15 can't be considered a "military weapon" because it cannot fire in fully automatic mode.

But Young dismissed that idea, noting that the semi-automatic AR-15's design is based on guns "that were first manufactured for military purposes" and that the AR-15 is "common and well-known in the military."

"The AR-15 and its analogs, along with large capacity magazines, are simply not weapons within the original meaning of the individual constitutional right to 'bear arms,'" Young wrote.

Young also upheld Healey's 2016 enforcement notice to gun sellers and manufacturers clarifying what constitutes a "copy" or "duplicate" weapon under the 1998 assault weapon ban, including copies of the Colt AR-15 and the Kalashnikov AK-47.

Healey's stepped-up enforcement followed the shooting rampage at a nightclub in Orlando, Florida, that killed 49 patrons. She said at the time that gun manufacturers were circumventing Massachusetts' ban by selling copycat versions of the weapons they claimed complied with the law.

The Massachusetts assault weapons ban mirrors the federal ban that expired in 2004. It bans the sale of specific and name-brand weapons and explicitly bans copies or duplicates of those weapons.

The lawsuit was filed last year by other groups who said the law infringed on their rights under the Second Amendment to the U.S. Constitution.

Jim Wallace, executive director of the Massachusetts gun owners group, said Young's upholding of Healey's crackdown on copycat assault weapons gives the attorney general "unbridled authority" to interpret laws as she pleases.

"Everyone in the state should be really concerned about that," Wallace said. "What if the next attorney general isn't a friend on one of your issues?"

Wallace said he couldn't yet say whether they will appeal the ruling.

The U.S. Supreme Court has ruled that the Second Amendment allows Americans to have guns in their homes for self-defense and blocked local governments from banning handguns.

But the court last year turned away an appeal from Maryland gun owners who challenged the state's ban on assault weapons.