Attorney General Brian Frosh, shown at his swearing-in ceremony in Annapolis, Md., in January, helped shepherd the legislation on assault weapons and high-capacity magazines. (Jonathan Newton/The Washington Post)

Attorneys for the state of Maryland squared off with gun rights advocates in federal appeals court Wednesday over the constitutionality of Maryland’s 2013 ban on assault weapons and high-capacity magazines.

The law, passed five months after the mass shooting in Newtown, Conn., is being challenged by a group of gun stores, gun-ownership organizations and individuals. They argue that the ban on commonly owned guns violates their Second Amendment right to bear arms.

Proponents of the law say the prohibited firearms are disproportionately used in mass acts of violence and rarely used in self-defense.

In an initial ruling in August, U.S. District Judge Catherine C. Blake upheld the ban, writing that “the court seriously doubts that the banned assault long guns are commonly possessed for lawful purposes, particularly self-defense in the home, which is at the core of the Second Amendment right.” She said Maryland’s law “substantially serves the government’s interest in protecting public safety.”

Wednesday’s oral arguments were heard by a three-judge panel of the U.S. Court of Appeals for the 4th Circuit, which is considering an appeal of that decision.

The Richmond-based appeals court has no deadline for returning a decision.

Maryland’s law makes the possession or sale of 45 types of assault weapons or a magazine capable of holding more than 10 rounds of ammunition a misdemeanor offense. It passed amid a wave of legislative efforts to increase regulation of gun purchases after the massacre at Sandy Hook Elementary School that left 20 students and six educators dead.

Matthew J. Fader, an attorney for the state, said the magazines banned by Maryland’s law result in “more shots fired, more injuries and more deaths.”

Some children at Sandy Hook were able to escape injury when shooter Adam Lanza stopped to reload his 30-round rifle, Fader said, adding, “If he had to change it out after 10 rounds, a lot more kids might have gotten out of that room.”

John Parker Sweeney, the attorney for the nine plaintiffs who sued the state, said many owners of the guns in question buy them for self-defense as well as for target practice and hunting.

“We have popular firearms millions of people have flocked to own because they choose to own them for lawful purposes,” he said. “These are not military weapons.”

Fader countered that the semiautomatic rifle called the AR-15 is essentially the same as the M-16 used by the military, with the same level of “dangerousness and lethality.” He added that the military recommends using its M-16 in semiautomatic mode for more accurate results, making it identical to the AR-15, which is prohibited in Maryland.

To Fader’s assertion that the state police could identify no cases in which the weapons banned in Maryland had been used in the state for self-defense, Sweeney said a gun doesn’t have to be shot “out the window every day” to prove its usefulness.

“I have purchased it in case I need to use it,” he said.

Maryland’s newly elected attorney general, Brian E. Frosh (D), attended the hearing but did not speak. A former state senator, he helped shepherd the 2013 legislation into law as chairman of the Senate Judicial Proceedings Committee.

“It’s a common-sense public safety measure,” Frosh said in an interview Tuesday. “We’ve seen the kind of death and destruction that results from these weapons in the wrong hands. Pick your example: Virginia Tech, Newtown, Tucson. Horrendous situations.”

Maryland Gov. Larry Hogan (R), who took office in January, opposed the gun ban when it was proposed but has said he now accepts it as settled state law.

Groups challenging the ban include the Maryland State Rifle and Pistol Association, the Maryland Licensed Firearms Dealers Association and the National Shooting Sports Foundation.

After the hearing, Shannon Alford, a lobbyist for the National Rifle Association in Maryland, said: “Hundreds of thousands of people use firearms to defend themselves every day. What this law does is limit their ability to do that.”

Vincent DeMarco, president of Marylanders to Prevent Gun Violence, which supports the ban, said not all provisions of the Firearm Safety Act of 2013 were challenged in court. As an example, he cited a part of the law that makes Maryland one of a handful of states that require buyers to provide fingerprints to obtain a handgun license.

“We believe this law will save lives,” DeMarco said.

A federal law banning assault weapons expired in 2004.