A voter stands in a booth at a voting station at the Metropolitan Museum of Art (MET) during the mayoral election process in New York on June 12, 2021.
CNN  — 

A New York state judge on Monday struck down a new law that would allow noncitizens to vote in local elections in New York City.

Under the legislation passed by the New York City Council in December, noncitizens who have lived in the city for at least 30 days and are legal permanent residents in the US – including green card holders, individuals with workers permits and DACA holders – would be allowed to vote in city elections, including mayor, public advocate, borough president and city council.

State Supreme Court Justice Ralph Porzio, based in Staten Island, said in a written decision that the legislation is illegal and violates the state constitution, which only provides for citizens to vote.

“There is no statutory ability for the City of New York to issue inconsistent laws permitting non-citizens to vote and exceed the authority granted to it by the New York State Constitution. Though voting is a right that so many cicizen take for granted, the City of New York cannot “obviate” the restrictions imposed by the constitution,” Porzio wrote.

A referendum would be required to give noncitizens the voting rights intended in the legislation, Porzio said in his ruling.

The law was set to go into effect January 2023.

A group with the Republican National Committee filed the lawsuit earlier this year challenging the legislation.

“By dramatically increasing the pool of eligible voters, the Non-Citizen Voting Law will dilute the votes of United States citizens, including the Plaintiffs in this action,” the initial compliant said.

The law would add approximately 800,000 newly eligible non-citizen voters, according to the lawsuit.

“Today, the state Supreme Court seeks to once again revoke that right and disenfranchise hundreds of thousands of permanent New York City residents from having a voice in the decisions that shape our city – and choosing the leaders who make those decisions,” New York City Public Advocate Jumaane Williams said on Twitter.

“This is a disappointing court ruling for people who value bringing in thousands more New Yorkers into the democratic process. We are evaluating next steps,” said New York City Law Department spokesperson Nicholas Paolucci.

The decision comes a day before the first of New York’s primary days this year. State offices including governor, attorney general and lieutenant governor, will be among those on the ballot. A second primary day will be held later this summer for New York’s congressional seats.