Guns line the walls of the firearms reference collection at the Washington Metropolitan Police Department headquarters in Washington. (Jacquelyn Martin/Associated Press)

A federal appeals court on Tuesday blocked the District from enforcing strict limits on carrying concealed firearms in public, restrictions that police officials have said are necessary to promote public safety in the nation’s capital.

In a 2-to-1 decision, the U.S. Court of Appeals for the District of Columbia Circuit said the District’s system, which requires a “good reason” to obtain a permit, is akin to an outright ban in violation of the Second Amendment.

“The good-reason law is necessarily a total ban on most D.C. residents’ right to carry a gun in the face of ordinary self-defense needs,” wrote Judge Thomas B. Griffith, who was joined by Judge Stephen F. Williams.

“Bans on the ability of most citizens to exercise an enumerated right would have to flunk any judicial test.”

The court’s rejection of the District’s permitting system is the latest legal blow for city officials who have been forced to rewrite gun-control regulations ever since the Supreme Court in 2008 used a D.C. case to declare a Second Amendment right to gun ownership. The ruling follows proposals from Republican members of Congress that would require the District to honor concealed-carry permits from other states in the wake of a June shooting at a GOP congressional baseball practice.

[GOP congressman wants his colleagues to be able to carry guns everywhere]

D.C. Attorney General Karl A. Racine said his office is considering whether to ask the full D.C. Circuit to review Tuesday’s decision by a three-judge panel and is committed to “fighting for common-sense gun rules.”

Griffith’s opinion is at odds with rulings from other circuit courts in finding that the Second Amendment guarantees someone’s right to “carry firearms beyond the home for self-defense — even in densely populated areas, even for those lacking self-defense needs.”

“The point of the Amendment isn’t to ensure that some guns would find their way into D.C., but that guns would be available to each responsible citizen as a rule,” Griffith wrote.

Griffith, a nominee of President George W. Bush, was part of the court’s majority in 2007 that overturned the District’s decades-old ban on handguns.

In her dissent Tuesday, Judge Karen LeCraft Henderson wrote that the District’s regulation “passes muster” because of the city’s unique security challenges as the capital and because it does not affect the right to keep a firearm at home.

The court, she wrote, should defer to District officials, including former police chief Cathy L. Lanier, who have backed the permitting system as a way to prevent crime.

The ruling from the three-judge panel gives city officials 30 days to decide whether to appeal for review by a full complement of D.C. Circuit judges. If the court does not agree to revisit the case, the order to permanently block enforcement of the “good reason” requirement would take effect seven days later.

Adam Winkler, a University of California at Los Angeles law professor who has written extensively on the Second Amendment, said he expects the full D.C. Circuit will put Tuesday’s decision on hold.

“Given the importance of this issue and the prospect that so many of the judges on the D.C. court might not want guns on their streets, they are likely to take this case,” Winkler said.

[Appeals court questions D.C.’s restrictions on concealed carry of firearms]

Residents who want a permit to carry a concealed firearm in the District must show that they have “good reason to fear injury” or a “proper reason,” such as transporting valuables. The regulations specify that living or working “in a high crime area shall not by itself” qualify as a good reason to carry.

As of July 15, D.C. police had approved 126 concealed-carry licenses and denied 417 applicants, according to the police department.

The District’s concealed-carry rules are similar to those in New Jersey, New York, Maryland and some jurisdictions in California.

The Supreme Court has turned down attempts to challenge decisions by other circuit courts that upheld similar concealed-carry restrictions in Maryland and New Jersey. In June, the high court also declined to review a California concealed-carry law. In that case, the U.S. Court of Appeals for the 9th Circuit said the Second Amendment does not protect the right to carry a concealed weapon in public.

Justice Clarence Thomas and Justice Neil M. Gorsuch, however, said the court should have accepted the California case.

Clark Neily of the Cato Institute, and one of the lawyers in the earlier challenge to D.C.’s handgun ban, praised the D.C. Circuit ruling Tuesday as “thoroughly researched and carefully reasoned” and said it would “make an ideal vehicle for the Supreme Court to finally decide whether the Second Amendment applies outside the home.”

At oral arguments in September, the D.C. Circuit was reviewing two challenges to the city’s law that resulted in conflicting opinions and was asked to decide whether the city’s permitting restrictions could remain in place while the broader challenge to the law is litigated.

District officials told the court the restrictions are necessary in a city that struggles with gun violence and faces heightened security challenges because of the number of federal government buildings and public officials.

The challenges were brought by gun owners and gun rights groups, including the Second Amendment Foundation and the Pink Pistols. Backed by Republican attorneys general from more than a dozen states, they told the court the District’s system is unconstitutional because the typical law-abiding citizen cannot obtain a permit.

Robert Barnes and Peter Hermann contributed to this report.