ruled that the ordinance passed constitutional muster.
After the Supreme Court granted review, the city repealed its law, apparently fearful of a loss that could sweep away other gun-control regulations, too. For good measure, New York State enacted a law allowing people with premises licenses to take their guns to their homes and businesses and to shooting ranges and competitions, whether in the city or not.
Paul D. Clement, a lawyer for the challengers in the case, New York State Rifle and Pistol Association v. City of New York, No. 18-280, said the restrictions imposed by the ordinance were at odds with the Second Amendment.
Richard P. Dearing, a lawyer for the city, responded that the ordinance was no longer on the books, meaning that there was nothing left for the court to decide.
District of Columbia v. Heller, which was decided by a 5-to-4 vote in 2008. The decision revolutionized Second Amendment jurisprudence by identifying an individual right to own guns, but it ruled only that the right applied inside the home, for self-defense.
Proponents of gun rights have been frustrated by lower-court rulings that have generally upheld various kinds of gun-control laws, often relying on a passage in the Heller decision that said some restrictions were presumptively constitutional.
“Nothing in our opinion,” Justice Antonin Scalia wrote for the majority in a passage that was apparently the price of Justice Anthony M. Kennedy’s fifth vote, “should be taken to cast doubt on longstanding prohibitions on the possession of firearms by felons and the mentally ill, or laws forbidding the carrying of firearms in sensitive places such as schools and government buildings, or laws imposing conditions and qualifications on the commercial sale of arms.”
Justice Scalia died in 2016, and Justice Kennedy retired last year.