D.C. Mayor Vincent C. Gray (D) on Friday signed into law emergency legislation allowing residents who are properly registered to seek permits to carry concealed firearms in the District.

The law, passed unanimously by the D.C. Council last month, is designed to address a federal judge’s ruling in July that rendered the District’s ban on carrying guns unconstitutional. The judge stayed the ruling until Oct. 22, giving the city time to either appeal or enact legislation that conforms to the judge’s order.

District officials said they will craft regulations so that people can start applying starting Oct. 22. The emergency legislation is in effect for 90 days, which officials said gives them time to refine the law through a more comprehensive legislative process, including public hearings.

D.C. Police Chief Cathy L. Lanier and D.C. Attorney General Irvin B. Nathan said in a statement on Friday that the law “cures the alleged constitutional flaws in the District’s licensing laws.”

But an attorney with the Second Amendment Foundation, which sued to overturn the ban, has already said that law is too restrictive . The law is drafted similar to Maryland’s, which requires applicants to show good reason. The chairman of the D.C. Council has said he would be surprised if more than 200 people in the District qualified.

The attorney, Alan Gura, has called the legislation “something of a joke” and said “it’s not much progress to move from a system from where licenses are not available to where licenses are only available if the city feels like issuing them.”

Gura and others involved the suit have filed a motion in U.S. District Court to bar the District from enforcing the law.

A public hearing on permanent gun legislation is scheduled for Oct. 16 at the John A. Wilson Building.