To carry or not to carry? That is no longer the question.

One month after a federal judge’s ruling, District officials have conceded that the city’s long-standing ban on carrying guns in public must be scrapped and replaced with a new law that will allow at least some law-abiding city residents to bear arms on city streets.

With only a 90-day stay of the ruling in place, the effort to write a new law is on a fast track, but it remains fraught with political, legal and policy complications. Among the issues to be resolved: Will the city allow only the open carrying of arms, “concealed carry,” or both? Will “sensitive areas” near national landmarks or government buildings be deemed gun-free zones? And to what extent will non-resident gun owners be permitted to bring their weapons into the city?

Those questions are being examined by a panel of city officials, including D.C. Council Chairman Phil Mendelson (D) and Tommy Wells (D-Ward 6), the chairman of the council’s public safety committee, as well as senior aides to Attorney General Irvin B. Nathan and Police Chief Cathy L. Lanier.

“I think it’s slowly coming into focus,” Mendelson said Thursday. “I do think that our carry requirements need to be very careful in light of the presence of federal and diplomatic officials.”

D.C. Council Chairman Phil Mendelson talks to reporters in May. (Aaron C. Davis/The Washington Post)

Mayor Vincent C. Gray (D), who said the July 26 ruling by U.S. District Senior Judge Frederick J. Scullin Jr. was “not unexpected,” has his own opinions on the matter. Asked about his preference when it comes to open vs. concealed carry, he recalled a 2012 trip to the New Hampshire legislature to lobby for D.C. voting rights.

“There was a legislator who was packing, and it was unnerving, to be honest with you,” he said, explaining his personal preference for allowing only concealed carry. “Given the fact that we have for so long had very stringent gun-control laws, to have somebody walking into a store with a gun on his hip could be unnerving.”

The crash effort to write a new law does not mean that the pending litigation, known as Palmer v. District of Columbia , is over.

Officials involved in the case but not authorized to publicly discuss it said there is dismay that Scullin did not acknowledge that the District, as the national capital, has special security interests that might justify more thorough restrictions on weapons. But given the state of Second Amendment jurisprudence after the Supreme Court’s rulings striking down handgun bans in D.C. and Chicago, they said, a flat prohibition on carrying firearms is unlikely to be restored by a higher court.

City lawyers on Monday asked Scullin to reconsider his decision — a move that is unlikely to change the ruling but could buy the city more time to examine its appellate options. Ted Gest, a spokesman for the attorney general’s office, reaffirmed Monday that no decision has been made regarding an appeal.

An appeal could carry risks for proponents of gun control, perhaps prompting a higher court to rule broadly — overturning not only the thorough D.C. ban but also state laws that are not quite as restrictive. And given the District’s status as a ward of Congress, there are also political calculations. Some Republicans and conservative Democrats have long expressed a willingness to override the city’s gun laws; a recently passed House budget bill, for instance, includes language preventing the District from enforcing the bulk of its local gun statutes.

“It’s a very complicated analysis,” said Josh Horwitz, executive director of the Coalition to Prevent Gun Violence, a nonprofit group that has advocated for strong gun-control laws in the city. “The District has been played a difficult hand, and they have to do the best they can to keep the court happy, keep Congress happy and keep the citizens safe.”

Wells said he has directed his staff to research state laws that are restrictive but have passed constitutional muster. He said he “would not hesitate” to model the city’s law on New York or Maryland — both known as “may issue” states, where officials exercise significant discretion in granting permits.

In Maryland, for instance, prospective gun carriers must provide state police with “good and substantial reason” for seeking a permit. Most other states are “shall issue” states, where gun owners who meet certain, sometimes minimal qualifications are entitled to a carry permit.

Alan Gura, the gun-rights attorney who represents the Palmer plaintiffs, said if the District models its new law on Maryland’s, “That would guarantee further litigation.”

In a separate case, Gura argued that the Maryland law was unconstitutional, but a federal appeals court rejected his argument last year, and the Supreme Court declined to hear the case in October. But observers say conflicting appeals court rulings will prompt the high court to take up the matter at some point in the near future.

“That type of law, I don’t think that’s going to hold up over time,” Gura said. “Sooner or later, the Supreme Court is going to strike down that sort of scheme. It doesn’t fly in any other area of law.”

Gura said he is agnostic on whether the city allows open or concealed carry or both, but he said he will closely examine any effort to ban gun possession within specified areas. Lanier suggested that would be a key provision in comments last month: “Our worry really is, how do we maintain the level of security in the nation’s capital that we’re required to maintain 24 hours a day in the areas that we’re required to maintain that security?”

Another potentially nettlesome area is how to treat gun owners living outside the District who want to bring the weapons into the city. In other parts of the country, states generally offer reciprocity to residents of states whose carry laws are at least as restrictive as their own; some states require nonresidents to secure a special permit.

Given the city’s status as the capital, Gura said, he expects the city to make “reasonable accommodation” for nonresidents to carry guns for self-defense. Mendelson called it a “very difficult issue” that is unlikely to be resolved quickly.

“It’s not as simple as, you have a license to carry in Wyoming so we’ll let you carry here,” Mendelson said. “Our residents don’t have the experience — the culture, if you will — round gun ownership that you have in rural states. We’re an urban jurisdiction, and our attitude toward guns is different than, say, Texas.”

While the city has asked Scullin for a longer stay of his ruling, Mendelson and Wells said they are moving to get a new law in place before the original stay expires. They expect to have an emergency bill crafted in time for the D.C. Council’s next meeting on Sept. 23, with more carefully considered permanent legislation to follow.

Horwitz said the District’s law will be a work in progress for some time. “Crafting good policy will take more than 90 days,” he said. “But I think they may not have a choice.”