The Supreme Court is turning to gun rights for the first time in nearly a decade, even though those who brought the case, New York City gun owners, already have won changes to the regulation they challenged.

The justices’ persistence in hearing arguments Monday despite the city’s action has made gun control advocates fearful that the court’s conservative majority could use the case to call into question gun restrictions across the country.

Gun rights groups are hoping the high court is on the verge of extending its landmark rulings from 2008 and 2010 that enshrined the right to have a gun for self-defense at home.

For years, the National Rifle Association and its allies had tried to get the court to say more about gun rights, even as mass shootings may have caused the justices to shy away from taking on new disputes over gun limits. Justice Clarence Thomas has been among members of the court who have complained that lower courts are treating the Second Amendment’s right to “keep and bear arms” as a second-class right.

The lawsuit in New York began as a challenge to the city's prohibition on carrying a licensed, locked and unloaded handgun outside the city limits, either to a shooting range or a second home.

Lower courts upheld the regulation, but the Supreme Court’s decision in January to step into the case signaled a revived interest in gun rights from a court with two new justices, Neil Gorsuch and Brett Kavanaugh, both appointees of President Donald Trump.

Officials at both the city and state level scrambled to find a way to remove the case from the justices’ grasp. Not only did the city change its regulation to allow licensed gun owners to transport their weapons to locations outside New York’s five boroughs, but the state enacted a law barring cities from imposing the challenged restrictions.

“There is no case or controversy because New York City has repealed the ordinance and the New York state Legislature has acted to make sure it remains repealed,” said Jonathan Lowy, chief counsel and vice president of the gun control group Brady’s legal action project.

But those moves failed to get the court to dismiss the case, although the justices are likely to ask at arguments about whether there’s anything left for them to decide.

Paul Clement, who represents three New York residents and New York's National Rifle Association affiliate challenging the transportation ban, said in an email that among the reasons the case remains alive legally is that the court frowns on tactical moves of the sort employed by the city and state that are meant to frustrate the justices’ review of an issue.

In addition, he wrote, that “the City still views firearm ownership as a privilege and not a fundamental right and is still in the business of limiting transport and denying licenses for a host of discretionary reasons.”

In the event the court reaches the substance of the law, the city does contend that what it calls its “former rule” did not violate the Constitution. But that would seem to be a tough sell given the court’s makeup, with Gorsuch and, in particular, Kavanaugh on the court.

Kavanaugh voted in dissent when his federal appeals court upheld the District of Columbia’s ban on semi-automatic rifles.

“Gun bans and gun regulations that are not longstanding or sufficiently rooted in text, history, and tradition are not consistent with the Second Amendment individual right," Kavanaugh wrote in 2011.

Gun control advocates worry that the court could adopt Kavanaugh’s legal rationale, potentially putting at risk regulations about who can carry guns in public, limits on large-capacity ammunition magazines and perhaps even restrictions on gun ownership by convicted criminals, including people convicted of domestic violence.

“This approach to the Second Amendment would treat gun rights as an absolute right, frozen in history, and not subject to any restrictions as public safety demands,” said Hannah Shearer, litigation director at the Giffords Law Center to Prevent Gun Violence.

Reflecting the possible high stakes, more than three dozen supporting legal briefs have been filed. The Trump administration, 25 mainly Republican states and 120 members of the House of Representatives are on the side of the gun owners.

A dozen Democratic-led states and 139 House lawmakers back the city. In addition, Sen. Sheldon Whitehouse, D-R.I., a vocal court critic, filed a brief joined by four Senate Democratic colleagues that asked the justices to dismiss the case and resist being drawn into what he called a political project.

Whitehouse also included a warning to the justices. “The Supreme Court is not well. And the people know it. Perhaps the Court can heal itself before the public demands it be ‘restructured in order to reduce the influence of politics,’” he wrote, quoting a public opinion poll showing support for such changes.

All 53 Republican senators responded with a letter urging the court not to be cowed by the Democrats’ threats.

A decision is expected by late June.