NEW YORK (AP) — A judge has blocked New York City from letting noncitizens vote for mayor and other municipal offices.

Republicans challenged the measure as unconstitutional. A Staten Island Judge agreed with the GOP in a ruling issued Monday.

In January, New York became the first major U.S. city to grant widespread municipal voting rights to noncitizens, though none had cast ballots yet. The law’s supporters said it gave an electoral voice to many people who have made a home in the city and pay taxes to it but face tough paths to citizenship.

The law had given more than 800,000 noncitizens and “Dreamers” in New York City access to the ballot box. Under it, noncitizens still wouldn’t have been able to vote for president or members of Congress in federal races, or in the state elections that pick the governor, judges and legislators.

A rally on the steps of City Hall Tuesday afternoon denounced the judge’s ruling. 

“I think it was really devastating news as a mother and as a New Yorker,” said Eva Santos, a DACA recipient who has lived in the Bronx for the past 25 years.

She is raising her three children, who are all United States citizens. 

“I feel like I’m not going to have a voice to be able to elect people who have the best interests at heart for my children,” said Santos.

Those who support the judge’s decision say the law clearly articulates that only citizens have the right to vote. 

“All the court did was follow the law,” said Republican State Assemblymember Michael Tannousis of Staten Island. 

“The law is clear, that this sacred right is saved for United States citizens,” Tannousis said.

Parties have 30 days to file for an appeal. Attorneys for the various advocacy groups involved in the lawsuit say they intend to do that right away.