WHEN THE Supreme Court declared in 2008 that the Second Amendment guarantees an individual right to own guns, the justices were careful to assure that various gun control measures could still pass constitutional muster. For example, the court wrote that “weapons that are most useful in military service — M-16 rifles and the like — may be banned.”

Since then, appeals courts have had to sort out how that logic applies to specific state-level gun laws. The latest is the U.S. Court of Appeals for the 4th Circuit, which considered a challenge to Maryland’s restrictions on military-style rifles — often referred to as assault rifles — and high-capacity magazines. The appeals court rightly found that Maryland’s law is perfectly reasonable — and that the alternative logic dissenters favored is exceptionally dangerous.

For all of the ink the court spilled, its decision centered on a few basic principles. The rifles and magazines that Maryland restricted are military-grade, bear features that make them exceptionally deadly and are unnecessary for self-defense.

The court noted that “large-capacity magazines enable shooters to inflict mass casualties while depriving victims and law enforcement officers of opportunities to escape or overwhelm the shooters while they reload their weapons.” Good guys with large magazines also may fire many more shots than necessary, endangering bystanders. Military-style rifles, meanwhile, bear a combination of features that increase their lethality: They fire heavy ammunition; they bear flash suppressors that can conceal a shooter’s location; they can accept grenade launchers, night sights and bayonets.

Throughout, the court could point to a variety of specific examples of mass shootings, from Newtown to San Bernardino to Virginia Tech to Orlando, in which the devices Maryland’s law regulates were used. More children might have escaped Sandy Hook Elementary School’s classrooms, for example, if the shooter did not have a 30-round magazine. That the magazine was not even larger than that — some can hold up to 100 rounds — may have saved the lives of nine children who escaped as the gunman reloaded. Given the Supreme Court’s plain language about M-16s, it is no stretch of logic to find that the Second Amendment does not protect owning these military-style weapons and accoutrements, or that Maryland had an interest in restricting them.

The court’s dissenters argued that military-style rifles and large-capacity magazines are popular tools for self-defense and other legal activities, and as such the government has practically no latitude to restrict ownership of them — or, in effect, to do much of anything else in the realm of gun control. This is illogical; an extremely lethal weapon may be popular, but that does not make it constitutionally protected. Moreover, “the weapons that Maryland sought to regulate here are emphatically not defensive in nature,” Judge J. Harvie Wilkinson III responded in a concurring opinion. “If this statute is struck down, it is difficult to see what class of non-automatic firearms could ever be regulated. If these weapons are outside the legislative compass, then virtually all weapons will be.”

Neither the majority on the 4th Circuit — nor a reasonable reading of the Constitution — demands that extreme result.