A federal judge let a sweeping New York gun law move forward Wednesday night hours before the regulations took effect. 

Judge Glenn Suddaby said the plaintiffs — including gun rights organizations and an upstate resident — did not have standing to bring the legal action. 

The judge noted that the legal gun owner could not demonstrate that he was at risk of a credible threat of prosecution under the new guidelines.

New York Attorney General Letitia James tweeted that the ruling was a major victory "against baseless attacks by the gun lobby." 

NEW YORK LEGISLATION DESIGNATES TIMES SQUARE A 'GUN FREE' ZONE

"This law will take effect tomorrow. We will continue to defend the constitutionality of our laws to protect New Yorkers from gun violence," she said. 

"Responsible gun control measures save lives. As gun violence continues to impact communities across the country, any attempts by the gun lobby to tear down New York’s sensible gun control laws will be met with fierce defense of the law," James added in a follow-up tweet.

Gun Free Zone sign

A person takes picture of an New York Police Department public affairs officer setting up signs reading Gun Free Zone around Times Square in New York on Wednesday, Aug. 31, 2022.  (AP Photo/Yuki Iwamura)

Erich Pratt, senior vice president of Gun Owners of America, one of the groups that filed the challenge, told The Associated Press that Suddaby’s opinion "contains a silver lining for New Yorkers and the nation" and said his group would continue to fight "against clear violations of the Second Amendment."

Signs were posted in New York City's Times Square declaring it a "Gun Free Zone." 

Times Square, along with parks, churches and theaters, are just some of the "sensitive" places that will be off-limits for guns. 

The measure was passed following a June Supreme Court decision in NYSRPA v. Bruen that expanded gun rights. 

An NYPD officer hands Gun Free Zone signs

A New York Police Department public affairs officer sets up signs reading Gun Free Zone around Times Square in New York on Wednesday, Aug. 31, 2022. (AP Photo/Yuki Iwamura)

NYPD HUNT FOR MASKED GUNMAN IN DEADLY SHOOTING OF 25-YEAR-OLD WOMAN NEAR NYU

It also sets strict standards for issuing concealed carry permits.

The law requires that applicants for a permit complete 16 hours of classroom training, two hours of live-fire exercises and provide a list of social media accounts over the past three years as part of a "character and conduct" review. 

Renewal or recertification of permits is required every three years. 

Gov. Kathy Hochul

New York Gov. Kathy Hochul speaks during a press conference about upcoming Gun Free Zone implementation at Times Square in New York on Wednesday, Aug. 31, 2022. (AP Photo/Yuki Iwamura)

There were reports of long lines at county clerks' offices and surges in applications before the law took effect.

"In response to the Supreme Court's decision to strike down New York's century-old concealed carry law, we took swift and thoughtful action to keep New Yorkers safe," New York Gov. Kathy Hochul said. "I refuse to surrender my right as Governor to protect New Yorkers from gun violence or any other form of harm. In New York State, we will continue leading the way forward and implementing common sense gun safety legislation."  

Some gun owners claim the New York law improperly limits their constitutional rights.

CLICK HERE TO GET THE FOX NEWS APP

Sheriffs in upstate New York told The Associated Press that additional work from the law will slow applications even further.

Advocates note that the list of prohibited spaces will make it difficult for people with legal permits to move around in public, and those entering private businesses carrying guns could do so only with permission. 

The Associated Press contributed to this report.