A federal judge on Tuesday delayed a ruling overturning the District’s long-standing ban on carrying handguns in public, once again making it illegal to have firearms on city streets.

Authorities have 90 days to decide whether to rewrite the law to conform with the court ruling. The District could also appeal the judge’s decision. Mayor Vincent C. Gray (D) said that officials are still deciding on a strategy but that an announcement would be made “in a matter of days.”

As lawmakers get to work, D.C. police returned to past arrest practices. Ten minutes after the judge granted the reprieve at 1:20 p.m., Police Chief Cathy L. Lanier rescinded orders hurriedly issued Sunday night and told 4,000 officers that “all laws related to firearms regulations and crimes remain in effect.”

But the chief also reminded officers to handle firearms cases “with caution,” noting that the public may not be aware that the old gun laws are at least temporarily back in force. The actions over the past two days reflect the confusion surrounding the decision by U.S. District Judge Frederick J. Scullin Jr., made public Saturday. District officials had sought a six-month delay in the “interest of public safety and clarity.”

D.C. Council member Tommy Wells (D-Ward 6), chairman of the public safety committee, said that attempts to redo the existing law will most likely include some provision to allow people to carry legally registered guns in some parts of the District. “I doubt that we will be able to sustain a complete ban,” he said.

The judge said Tuesday that he would consider arguments next month about whether to extend the stay pending an appeal. But Scullin cast doubt on the prospect of District officials winning a longer delay, writing that “the court is not convinced that defendants will be able to demonstrate a likelihood of success on the merits to warrant such a stay.” He set a deadline of Oct. 22 for the council to decide whether to enact new legislation “consistent with the court’s ruling.”

Still, the delay came as welcome news to District officials who have been scrambling after the surprise ruling upended one of the nation’s strictest gun laws and the centerpiece of the police chief’s crime-fighting strategy. “It gives us time to pause and to act,” said Gray’s spokeswoman, Doxie McCoy.

Alan Gura, the lead attorney for the plaintiffs, said that 90 days is plenty of time for officials to act and that his clients would oppose any delay beyond October. “Every day that goes by, the people are being denied a fundamental constitutional right,” Gura said. “It’s time for the city to come to grips with that fact.”

The 2009 lawsuit was brought by the Second Amendment Foundation and Tom Palmer, one of the people who successfully sued the District in an earlier case that led to the Supreme Court’s landmark 2008 decision — Heller v. the District of Columbia — declaring that the Second Amendment provides an individual right to own firearms.

Scullin’s initial ruling meant that thousands of city residents with registered handguns — about 3,100 gun permits have been issued in the District — in addition to legal gun owners from other states, could carry pistols in Washington. But the D.C. law enacted after the Heller decision only allowed people with registered weapons to keep them in their homes. That law is unconstitutional, the judge ruled, because the city has no process for issuing carry licenses to registered gun owners.

D.C. Council Chairman Phil Mendelson (D) said it is important to move carefully in the wake of the court decision, noting that the first laws passed after the Heller case were far from perfect.

“We made a lot of mistakes then,” said Mendelson, who wrote the first bills. “Some of the registration requirements were more burdensome than they should have been. It takes time to figure this out.”

He said the issues presented by the end of the ban on carrying weapons are equally complex, if not more so: “Can they carry during special events? Can they carry during presidential motorcades? . . . There’s a lot to be worked out, and this gives us time to work it out.”

Wells said he’s looking to laws crafted by other states that withstood court challenges. For instance, Maryland requires that someone seeking to carry a gun in public show a “good and substantial reason.” A federal appeals court decided last year that the rule balances the rights of the gun owner with the state’s “significant interest in protecting public safety and preventing crime.”

Wells is already fighting back on one front, highlighting a law that enables private property owners to ban guns from their premises. His aide Julia Robey Christian has created a sign for business owners warning gun holders to stay away from their shops. It features a D.C. flag motif with crossed-out silhouettes of handguns replacing the stars. Underneath: “This establishment proudly supports a GUN FREE DC.”

Mike DeBonis and Mary Pat Flaherty contributed to this report.