A federal appeals court on Friday struck down the District’s one-gun-per-month law as unconstitutional, while upholding the city government’s authority to issue gun regulations to promote public safety.

In a 2-to-1 ruling, the U.S. Court of Appeals for the District of Columbia Circuit also knocked down requirements that gun owners re-register weapons every three years, bring the firearm with them to register and pass a 15-question test on local gun laws.

The lawsuit is one of many challenges to District regulations that were written after the Supreme Court in 2008 used a D.C. case to declare a Second Amendment guarantee to own a firearm for self-defense.

The most significant element of the appeals court’s decision Friday would get rid of the District’s prohibition on registering more than one gun a month. California, Maryland, New Jersey and New York City limit handgun purchases in this way. Virginia repealed a similar requirement in 2012, and the state Senate in January blocked an effort by Gov. Terry McAuliffe (D) to revive it.

Writing for the majority, Judge Douglas H. Ginsburg said the government’s claim that registration limits reduce the number of guns on the street “does not justify restricting an individual’s undoubted constitutional right to keep arms (plural) in his or her home.”

“Taken to its logical conclusion, that reasoning would justify a total ban on firearms kept in the home,” wrote Ginsburg, who was appointed by President Ronald Reagan. Ginsburg was joined by Judge Patricia A. Millett, who was appointed by President Obama.

Judge Karen LeCraft Henderson disagreed, calling the one-gun-a-month limit a temporary, acceptable burden.

“Today I fear the majority has initiated a retreat — at least in part — from the practice of restraint,” wrote Henderson, who was appointed by President George H.W. Bush.

The plaintiff’s argument, she wrote, “has no stopping point: it would authorize everyone to possess his own Rambo-style armory.”

The ruling comes as D.C. police are struggling to curtail a spike in homicides and shootings. Although the pace of killings has slowed over the past two weeks, as of Friday afternoon the District had recorded 111 homicides this year, up from 79 at this time in 2014, a 40 percent increase. There were 105 homicides all of last year.

D.C. Council member Jack Evans (D-Ward 2), who sits on the council’s Judiciary Committee, called Friday’s ruling “a mistake.”

“It should be moving in the other direction — to strengthen, not to weaken, the gun laws in the District,” he said.

Allowing District residents to hold more guns is “not going to help” the city get control of the violence, Evans warned. “It’s not going to make it less likely that we’ll have violence,” he said.

City officials are looking for ways to get illegal guns off the streets. No licensed dealer sells guns in the District. Residents who buy a weapon from a licensed dealer outside the city must obtain a registration certificate from District police and pick up the weapon after it has been shipped to a dealer located in police headquarters.

According to D.C. police, from July 2008 to Sept. 5, 2015, 4,298 handguns and 2,316 shotguns and rifles have been registered in the District.

In its decision, the court upheld as constitutional many of the District’s registration rules. Residents must appear in person at police headquarters to be photographed and fingerprinted, in addition to completing a one-hour firearms safety course.

Dan Peterson, one of the attorneys representing lead plaintiff Dick Heller, said the decision would make it easier for people to navigate the District’s registration process.

“It’s still a very restrictive system,” he said.

D.C. Attorney General Karl A. Racine said in a statement that his office is weighing whether to seek a rehearing before the full appeals court. He expressed satisfaction that the District’s core registration requirement was upheld.

“We will continue to defend our gun laws against challenges from those who would impose their views on our residents,” Racine said.

Adam Winkler, a law professor at the University of California at Los Angeles, called the court’s decision to strike down the District’s one-gun-a-month rule surprising, particularly if its logic extends to limits on monthly purchases.

“The court may be correct that gun traffickers won’t register their guns, [but] there’s no doubt that gun traffickers do buy multiple guns frequently,” said Winkler, author of “Gunfight: The Battle over the Right to Bear Arms in America.” “If states can’t limit gun purchases, it will be a boon for gun traffickers.”

The U.S. Court of Appeals for the District of Columbia Circuit is set to hear oral arguments in November in a separate case challenging the city’s regulations on carrying concealed firearms in public. In May, a federal judge rejected a key provision of the city’s requirement that applicants demonstrate a good reason — such as a work-related need to carry large amounts of cash — to obtain such a permit.

Abigail Hauslohner and Peter Hermann contributed to this report.