A legal challenge to a New York state law that allows the names and addresses of handgun permit holders in New York to be made public will move forward after a federal judge partly denied a motion to dismiss from the state on Monday.

U.S. District Judge Kenneth Karas of the Southern District of New York said in a decision that the lawsuit may continue on the plaintiffs’ claims that the law violates their Second Amendment rights, but their claims about privacy rights were dismissed.

State Attorney General Barbara Underwood’s office, acting as an intervenor in the lawsuit, had moved to dismiss the complaint in its entirety earlier this year. A spokeswoman for the office did not respond to a request for comment on Monday.

The lawsuit deals with two individuals who argued in the lawsuit against Putnam County in 2016 that their names and addresses should not be a matter of public record despite a New York state law that requires it.

A part of the state’s penal law on firearms provides that “the name and address of any person to whom an application for any license has been granted shall be a public record.”

There are exceptions, like if the individual is an active police officer or if they were a witness during a previous criminal proceeding. There are also exceptions for people who have reason to believe their life or safety may be endangered by having their name and address made public or if they think they could be harassed.

The law was used by The Journal News, a Hudson Valley-based newspaper, in 2012 to obtain and publish the names and addresses of handgun permit holders in Westchester and Rockland counties, which border Putnam County. The feature sparked national outrage, which led the newspaper to remove the data from its website.

The newspaper had also requested the information from Putnam County through the Freedom of Information Law, but County Clerk Michael Bartolotti denied the request. The county was eventually ordered by a state appeals court to comply with its inquiry and provide the names and addresses of gun permit holders who did not qualify for an exemption.

Neither of the plaintiffs believe they meet the requirements to be exempt from having their information be a matter of public record. The first plaintiff is already a handgun permit holder but said he considers his status a private, personal matter. The second said he wants to own a handgun but hasn’t bought one because he doesn’t think he would be exempt and does not want his personal information available to the public. Neither is named in the lawsuit.

They are represented by Charles Cooper, founding member and chairman of Cooper & Kirk in Washington, D.C.

Cooper said the case was likely to be resolved through summary judgment and was happy with Monday’s decision despite the motion to dismiss partly being granted.

“I’m pleased with the court’s ruling denying the motion to dismiss our Second Amendment challenge to the public disclosure law,” Cooper said. “We look forward to moving the case forward to the next stage.”

Their complaint against Putnam from 2016 included claims that the county was violating their right to privacy afforded by the 14th Amendment and their right to armed self-defense under the Second Amendment.

Karas said in his decision Monday that the first plaintiff had standing to bring the 14th Amendment claims but not the Second Amendment claims because he already owns a gun. The second plaintiff had standing to bring both claims, he said.

“Doe No. 2 claims he is in a catch-22: vindication of his Second Amendment rights comes at the expense of his constitutional rights to privacy,” Karas wrote. “Because none of the exceptions to disclosure allegedly apply to him, seeking one would be futile.”

In rejecting the attorney general’s motion to dismiss the Second Amendment claims, Karas wrote that attorneys for the office asserted the purpose of the law without providing evidence of how it benefits the government’s interest. But that doesn’t mean the plaintiffs’ claims will survive in the future, he wrote.

“This is not to say that the NYAG could not satisfy this burden in a summary judgment motion, or that the law necessarily fails to survive intermediate scrutiny,” Karas wrote. “Rather, the court merely concludes that plaintiffs have plausibly stated a Second Amendment claim.”

On the 14th Amendment claims, Karas wrote that a handgun permit holder’s name and address were not a category that other courts have deemed to be protected by a right to privacy.

A conference is scheduled for Nov. 15 in the case to discuss where the parties will go from here.

Assistant Attorneys General Mark Klein and William Taylor Jr. were on the briefs supporting their motion to dismiss the complaint. Putnam County Attorney Jennifer Baumgartner did not return a request for comment Monday.

READ MORE:

NRA Argues Discovery Could Show State Coerced Companies to Cut Tie

Death of a Gun Owner: Criminal Liability for an Heir?

Circuit Largely Upholds Weapon Restrictions in NY, CT