The Supreme Court heard its first Second Amendment case in a decade Monday, but there were indications that the justices may no longer think they have a case to decide.

The controversy involves 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 of 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.

It was the first time the court had considered the limits of gun restrictions without retired justice Anthony M. Kennedy, who played the pivotal role between conservatives and liberals on such cases. Both sides of the gun control issue said the innocuous sounding case carried great potential for change.

The arguments Monday suggested that New York would have had trouble defending the old regulations. But most of the hour-long discourse was consumed with questions about whether the court still has a live controversy before it, a requirement for rendering an opinion.

The court denied New York’s earlier plea to dismiss the case as moot. It said it would consider the question after argument.

Justice Sonia Sotomayor said New York has “thrown in the towel,” and the plaintiffs now are “asking us to opine on a law that’s not on the books anymore.”

Justice Ruth Bader Ginsburg asked Paul D. Clement, the Washington lawyer representing the New York State Rifle and Pistol Association, the National Rifle Association affiliate that brought the action: “So, what’s left of the case? The petitioners have gotten all the relief that they sought.”

Clement said the case was still alive — the new restrictions do not make clear whether his clients could be harmed for making a stop for coffee or to use the restroom while transporting their unloaded weapons to a shooting range, for instance — and he said they might be hurt in applying for licenses because of past violations of the old law.

Moreover, “if we prevailed in the district court before these changes in the law, we would have been entitled, of course, to a declaration that the transport ban is and always was unconstitutional.”

But the tenor of the arguments suggested Clement would need all five conservatives on board to keep the case on track. The most closely watched was Chief Justice John G. Roberts Jr., and the only questions he asked seemed meant to reassure himself that the plaintiffs would not suffer if the case was declared moot.

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

“Is there any way in which any violation could prejudice a gun owner?” Roberts asked.

Dearing said no.

“Is there any way in which a finding of mootness would prejudice further options available to the petitioners in this case, for example, seeking damages?” Roberts asked.

Again, Dearing said no, and added more assurance there would be no “collateral consequences” to those who brought the case.

“I’m making that representation to this court on the record on behalf of the City of New York,” Dearing said.

The Trump administration had weighed in on the side of the challengers. Deputy Solicitor General Jeffrey B. Wall said the case was still alive because of the possibility that the plaintiffs in the case could seek damages for having their rights violated by the old transport ban.

He faced skeptical questioning from the liberals. Ginsburg noted that the plaintiffs had never asked for damages, and wondered if the solicitor general had “ever asked this court to allow such a late interjection of a damages question to save a case from mootness?”

Wall answered: “I don’t know of any case in which it’s directly come up or we’ve weighed in on it.”

Several of the court’s conservatives did not seem satisfied with Dearing’s representations. Justices Samuel A. Alito Jr. and Neil M. Gorsuch looked for ways the case might still be worthy of a decision on its merits and seemed clear they would find the old restrictions unconstitutional.

Alito asked Dearing if the people of New York were less safe now that the city no longer had the regulations it had defended as necessary in the district court and at the U.S. Court of Appeals for the 2nd Circuit. Both ruled for the city.

When Dearing said no, Alito asked: “Well, if they’re not less safe, then what possible justification could there have been for the old rule, which you have abandoned?”

Justice Brett M. Kavanaugh, who replaced Kennedy, did not ask a question nor did Justice Clarence Thomas, as is the latter’s custom.

In the past, Thomas, joined by Gorsuch, has criticized the court for not taking more cases to build out the right to individual gun ownership the Supreme Court recognized in 2008 in District of Columbia v. Heller. Lower courts have mostly said the decision allows state and local gun control measures if they can be defended as protecting the public’s safety.

Clement said it was important for the court to use the case to send a message.

“The way the lower courts have interpreted Heller is like text, history, and tradition is a one-way ratchet,” Clement said. “If text, history, and tradition sort of allow this practice, then they’ll uphold the law.” If text and history point the other way, lower courts still look for a way to uphold the law under a public-safety rationale.

“I think this court should reaffirm that text, history, and tradition essentially is the test and can be administered in a way that provides real protection for Second Amendment rights.”

Gorsuch seemed disturbed by the “herculean, late-breaking efforts to moot the case” and keep the court from making such a ruling.

But Dearing said the petitioners should not be upset that the city has conceded, nor should the court.

“Petitioners suggest these changes should be viewed skeptically, but it’s a good thing and not a cause for concern when the government responds to litigation by resolving matters through the democratic process,” Dearing said.

Should the court decide the case is moot, it will not take long for it to find another chance to opine on gun regulations. A number of cases await, concerning issues such as permits to carry a gun outside the home or bans on the sale of certain kinds of weapons.

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