People cross the Brooklyn Bridge as they attend "March for Our Lives" rally, one of a series of nationwide protests against gun violence, New York City, US, June 11, 2022. (ERIC COX / REUTERS)

A federal judge has blocked New York from restricting the carrying of guns on private property under a Democratic-backed law adopted following the US Supreme Court's June ruling that struck down the state's strict gun permitting regime.

Property owners indeed have the right to exclude… But the state may not unilaterally exercise that right and, thereby, interfere with the Second Amendment rights of law-abiding citizens who seek to carry for self-defense outside of their own homes.

John Sinatra,

US District Judge

Tuesday's ruling by US District Judge John Sinatra in Buffalo struck down a provision in the law that made it a felony for a licensed gun owner to possess a firearm on any private property unless the property owner allowed it with a sign or by giving express consent.

Sinatra, appointed by Republican former President Donald Trump, found that the provision violated the US Constitution's Second Amendment right to "keep and bear arms."

ALSO READ: Biden signs gun safety bill into law, takes swipe at Supreme Court

The ruling marked the latest courtroom victory for gun owners challenging New York's law, called the Concealed Carry Improvement Act, that as of Sept 1 made obtaining a firearms license more difficult and barred firearms from a long list of "sensitive" public and private places. A federal appeals court has put on hold rulings by another judge that blocked major parts of the law including bars on people from carrying concealed guns in certain "sensitive locations."

Sinatra ruled in a lawsuit by two firearms owners and two gun rights groups. The Firearms Policy Coalition, one of those groups, called the ruling a "monumental step" toward restoring the gun rights of New Yorkers.

Sinatra said the provision at issue was unconstitutional under the Supreme Court's precedents including June's ruling.

READ MORE: Gun violence stems from US institutional flaw

"Property owners indeed have the right to exclude," Sinatra wrote. "But the state may not unilaterally exercise that right and, thereby, interfere with the Second Amendment rights of law-abiding citizens who seek to carry for self-defense outside of their own homes."

In a court filing, the office of New York Attorney General Letitia James, a Democrat, said it would appeal.