The Supreme Court on Monday dismissed a major gun rights case from New York because the law in question has been rescinded, disappointing Second Amendment activists and several conservative justices, who said the court had been manipulated.

The decision dismissing the case was unsigned, but three justices filed a dissent.

“By incorrectly dismissing this case as moot, the court permits our docket to be manipulated in a way that should not be countenanced,” wrote Justice Samuel A. Alito Jr., joined by Justices Clarence Thomas and Neil M. Gorsuch.

But the setback for gun rights activists may only be temporary. It was clear from the decision that four justices — the minimum number needed to take a case — want to examine whether lower courts have been too quick to uphold gun control measures that might violate the Second Amendment.

Awaiting the court’s action are cases involving the right to carry arms outside the home and restrictions on the kinds of weapons that can be sold and possessed.

Although Justice Brett M. Kavanaugh wrote that he agreed the New York case was moot, he added, “I share Justice Alito’s concern that some federal and state courts may not be properly applying” the Supreme Court’s decision recognizing an individual’s right to gun ownership. “The Court should address that issue soon,” he wrote.

The case at issue involved now-rescinded restrictions unique to New York City about whether citizens who have a license to keep a gun in their homes may transport them to firing ranges outside the city or to a second home in the state.

After the Supreme Court took the case to decide whether those restrictions violated the constitutional right to keep and bear arms, the city got rid of them. Then the state of New York passed a law that would keep them from being reenacted.

The unstated purpose of both the city and state actions might have been to make the case moot and deny conservatives on the court a chance to explore whether there is a right to carry a gun outside the home.

The majority opinion said only that the case was moot and that arguments made by plaintiffs to try to keep it alive were too late.

Chief Justice John G. Roberts Jr. appeared to be in the majority along with liberal Justices Ruth Bader Ginsburg, Stephen G. Breyer, Sonia Sotomayor and Elena Kagan, and Kavanaugh, chosen by President Trump and praised by gun rights groups such as the National Rifle Association.

The arguments in December on the New York case were the first time the court had considered the limits of gun-control measures since the retirement of justice Anthony M. Kennedy, who played a pivotal role between conservatives and liberals on such cases. But most of the discussion involved questions about whether the court still had a live controversy because the restrictions were no longer on the books.

Richard P. Dearing, representing the city of New York, told the court in November that local authorities would not undertake “any prosecution or action” based on the now-repealed regulations.

The lawsuit was brought by the New York State Rifle and Pistol Association, an affiliate of the National Rifle Association, and supported by the Trump administration. They had told the court that the case was alive because of the possibility that the plaintiffs in the case could seek damages for having their rights violated by the old transport ban.

The majority opinion said those concerns were raised too late and could be addressed in lower courts.

Gun control groups celebrated the decision.

“This ruling should come as a relief to every American worried about keeping their family safe from gun violence,” Shannon Watts, founder of Moms Demand Action, said in a statement. “The NRA and its allies are losing everywhere from state legislatures to boardrooms, which means the courts are their last hope. But they’ll keep losing there too, because the courts have ruled time and again that common-sense gun laws are constitutional.”

Jason Ouimet, executive director for the NRA Institute for Legislative Action, said in a statement: “Now that the Supreme Court has accepted New York’s surrender, perhaps the city will finally repay all legal fees incurred by their deceit. . . . The justices’ concerns about Second Amendment infringements are real, and our membership is excited to have their rights formally vindicated before the nation’s highest court.”

Alito said that if the court had reached the merits of the decision, it would have been clear the New York law would not pass muster.

“History provides no support for a restriction of this type,” Alito wrote. “The city’s public safety arguments were weak on their face, were not substantiated in any way, and were accepted below with no serious probing.”

The case is New York State Rifle and Pistol Association v. City of New York.

Ann E. Marimow contributed to this report.