(M. Spencer Green/AP)

A federal judge ruled Monday that the District can continue to enforce its gun-permitting system, while she considers a closely watched constitutional challenge to the city’s requirement that applicants show “good reason” before obtaining permits to carry a concealed handgun in public.

The decision by U.S. District Judge Colleen Kollar-Kotelly marked a reversal from a ruling last May by U.S. District Judge Frederick J. Scullin Jr. — a visiting federal judge from New York — who barred the city from enforcing what courts called the “good reason/other proper reason” regulation.

Monday’s decision had no immediate impact on D.C. police gun-permitting processes, which have remained in force since an appeals court in June stayed Scullin’s preliminary injunction and later set it aside, ordering that a new judge hear the case.

A three-judge panel of the U.S. Court of Appeals for the D.C. Circuit said in December that Scullin — a senior judge tapped in 2011 to help with a backlog at the District court — should not have handled the case because it went beyond the bounds of his temporary assignment. The panel did not rule on the reasoning he used in his decision.

Scullin had ruled the provision “impinges on Plaintiffs’ Second Amendment right to bear arms.”

The December decision on Scullin cleared the way for a new judge to hear the “good reason” issue.

A District law passed in September 2014 gives police discretion to grant licenses to applicants who show “good reason to fear injury” or “any other proper reason for carrying a pistol,” such as employment transporting cash or other valuables.

Scullin’s order was significant because the District’s law is similar to legislation in Maryland, New Jersey and New York, and the Supreme Court has yet to decide whether the Second Amendment requires cities such as the District to allow guns in public or what regulations are permitted.

In her 31-page opinion Monday, Kollar-Kotelly disagreed with Scullin and wrote that even assuming — but not deciding — the Second Amendment extends the right to carry a weapon outside one’s home, that did not offset the District and the public’s interest in promoting public safety and preventing crime while the constitutional challenge is making it ways through the court.

The judge noted that the District — with nearly 10,000 people per square mile — is an urban area more than 100 times more densely populated the U.S. average, and more densely populated than any state.

The public safety interest, she wrote, “is heightened here where the alleged constitutional violation pertains to the public carrying of operable handguns, which poses a potential risk to others — carriers and non-carriers alike — far greater than the risk of possessing a handgun within the home,” Kollar-Kotelly wrote.

Alan Gura, attorney for Brian Wrenn, two other individual plaintiffs and the Second Amendment Foundation, a gun rights advocacy group, immediately filed a notice of appeal of Kollar-Kotelly’s decision.

“We’re looking forward to the appeal,” Gura of the Gura & Possessky law firm in Alexandria, Va., said in an email.

D.C. Attorney General Karl A. Racine (D) said the District was “pleased.”