WASHINGTON — The Supreme Court on Tuesday agreed to hear a challenge to New York City's restriction on transporting handguns outside the city limits.

It's the first time in a decade that the court has agreed to hear a case on the nature of gun rights, this time on the nature of the rights outside the home.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Under a city law, residents who have a permit to own a handgun can take it outside the home to a city shooting range, provided the weapon is unloaded and in a locked container. But they cannot take their guns outside the city limits.

New York imposed the restriction after concluding that it was too difficult to determine whether someone found to have a gun in the car was taking it to a local shooting range or one elsewhere.

Three residents challenged the law. Two of them said they wanted to take their guns to ranges outside the city, and the third wanted to take his gun back and forth to a second home in Hancock, New York. They argued that the law violated their Second Amendment rights.

"The city has presented precisely zero empirical evidence that transporting an unloaded handgun locked up in a container separate from its ammunition (an actively that federal law affirmatively protests) poses any material safety risk," they said in a legal brief.

They also said the city law discourages residents from going to shooting ranges to gain proficiency in using their handguns.

Lower courts upheld the restriction, and the city urged the Supreme Court not to take the cases and instead to let those rulings stand. New York has seven shooting ranges, providing ample facilities for those wishing to improve their skills. And anyone wealthy enough to own a second home can afford to buy a second handgun and keep it there, the city said.

Since ruling in 2008 that the Constitution guarantees a right to keep a handgun at home for self defense, the Supreme Court has declined to hear challenges to other gun laws. Justices Clarence Thomas and Samuel Alito has said the court's reluctance to take other gun cases means their colleagues are treating the Second Amendment as a "second class" right.