The D.C. Council is poised to pass legislation Tuesday allowing the carrying of concealed firearms in public, but virtually no one involved is happy about it — not the lawmakers voting for it, not the attorney who brought the lawsuit forcing them to do it, and not the federal agency charged with protecting the president and foreign dignitaries.

The vote comes less than two months after a federal judge struck down the city’s long-
standing prohibition on carrying weapons in public, saying it does not comply with Supreme Court precedent. The judge’s ruling is under a temporary stay, giving city leaders time to fashion a new gun carry law that meets constitutional muster.

But even the tightly restrictive draft legislation unveiled last week by Mayor Vincent C. Gray (D) and D.C. Council Chairman Phil Mendelson (D) is giving council members heartburn. Several said Monday they would vote for it only grudgingly — knowing that should the city fail to pass a new law, the judge’s ruling would wipe out a broad swath of the city’s restrictive gun statutes when the stay expires next month.

“We don’t want to be in contempt of court, and we believe that we can accommodate the court with the emergency law and still appeal the decision,” said Tommy Wells (D-Ward 6). “But frankly, I am reluctant for the District to be the vehicle by which the gun laws in America are systematically weakened or eviscerated.”

Wells, who chairs the council’s Judiciary and Public Safety Committee, said he was afraid an appeal could result in a new Supreme Court ruling that could threaten similarly restrictive laws in several states.

While city officials have not decided whether to appeal the judge’s ruling, several have said that they would rather do so with the proposed law in place — allowing the carrying of weapons, but with restrictions — than with only the outright ban that the judge struck down.

From a legal perspective, Wells said, passing the new law “is like throwing a tennis ball into a dark room to find out where the furniture is.”

On the other side of the issue, the attorney for the litigants who challenged the ban said that the proposed new law is hardly an improvement over what it would replace.

“It plainly fails to comply with the court’s ruling,” Alan Gura said Monday. “The court instructed the city to treat the carrying of handguns as a right rooted in the constitutional interest in self-defense. . . . It’s not much progress to move from a system where ­licenses are not available to a system where licenses are only available if the city feels like issuing them. It’s something of a joke.”

Should the bill pass Tuesday, Gura said, he would take the matter before U.S. District Judge Frederick J. Scullin Jr., who struck down the carry ban in July and has scheduled an Oct. 17 hearing on the city’s request that he reconsider that decision.

“They have to explain why this is different than what currently exists,” Gura said. “I don’t believe they can do that.”

The bill to be taken up Tuesday would allow city residents owning properly registered handguns, as well as nonresidents holding a state carry license, to apply for a permit to bear a concealed weapon in the District.

But an applicant would need to show “good reason to fear injury to his or her person or property” or “any other proper reason for carrying a pistol” and would have to pass rigorous background checks and training regimes. The final decision on whether to issue a license would rest with the chief of police, with appeals sent to a five-member review board.

Federal judges have upheld similar discretionary laws in Maryland and New Jersey, but an appeals court recently struck down California’s “may issue” concealed-carry law.

Under the proposed D.C. bill, firearms could not be carried inside schools, hospitals, government buildings, public transportation vehicles, establishments serving alcoholic beverages, stadiums, arenas and within 1,000 feet of a dignitary under police protection.

Mendelson said the Secret Service commented on an early draft of the legislation. The federal agency “wanted broader restrictions than had been included” in that draft, he said, noting that the proposed bill includes a ban on carrying guns in the vicinity of the White House — the area bordered by 15th and 17th streets, H Street and Constitution Avenue NW.

“I understand that the Secret Service is very uneasy,” Mendelson said. He declined to comment further on the agency’s position, citing the sensitivity of the negotiations.

A spokesman for the Secret Service did not return a phone call or e-mails seeking comment Monday.

Two people familiar with the Secret Service’s comments but not authorized to discuss them publicly said the agency had also asked for restrictions around foreign diplomatic facilities, whose security is under Secret Service purview, but those requests were not incorporated into the emergency bill because of concerns about the enforceability of such restrictions.

The District’s gun law stands to be further refined, whether by the courts or by the council itself. Should the emergency bill pass Tuesday and receive Gray’s signature, it would be effective for only 90 days. Drafting permanent legislation is a longer process, involving public hearings, multiple council votes and a period of congressional review.