Judge Ralph Porzio, of New York State Supreme Court for Staten Island, ruled the law violated the state constitution, which says that "[e]very citizen" is entitled to vote.

The City Council, which is controlled by Democrats, passed the law last December, and it went into effect after both Mayor Bill de Blasio and his successor, Eric Adams, declined to either sign it or veto it.

The law allowed an estimated 800,000 to 1 million non-citizens living in the city as lawful permanent residents of the United States or with U.S. authorization to work here to vote in elections for city-wide office, but not in state-wide or federal elections. There are currently about 6.7 million people of voting age in New York City.

The law required that a person must have been a resident of the city for at least 30 days prior to the election they wished to vote in, which critics of the law said was too short. Republicans opposed the law in part on the belief that a majority of immigrants are more likely to vote Democrat.

Proponents of the law said it enfranchised the city's huge population of non-citizens who pay taxes and contribute to the life and culture of a city that has long been a beacon for immigrants, as symbolized by the Statue of Liberty in New York Harbor.

Opponents, including the Republican Party and New York lawmakers who sued the city, said the law unfairly and unconstitutionally diluted the power of citizens' votes and would harm politicians by forcing them to restructure their election strategies.

There was no immediate comment from the City Council or the mayor's office, who could challenge the ruling in a higher court.

Michael Tannousis, a Republican who represents parts of Staten Island and Brooklyn in the New York State Assembly, was one of the plaintiffs who accused the council of trying to manipulate the electoral system.

"As the son of immigrants that came to this country legally and worked tirelessly to become citizens, I consider voting to be a sacred right bestowed on American citizens," he said in a statement. "The idea that a person can move to New York City and register to vote after 30 days is preposterous and ripe for fraud."

(Reporting by Jonathan Allen; Editing by Leslie Adler)

By Jonathan Allen