NEW YORK — The city council here on Thursday approved a measure that will allow immigrants who are not U.S. citizens to vote for mayor and other key municipal positions, a historic move that is igniting threats of legal challenges from Republicans and hopes from Democrats that other cities will follow suit.

The council voted 33 to 14 with two abstentions and the measure grants noncitizens significant leverage over a broad array of elective offices, including the mayor, city council, comptroller, the public advocate and the leaders of the city’s five boroughs who oversee issues such as zoning.

The next election will be in mid-2023, officials said.

Approximately 1 million adult noncitizens live in New York City, which amounts to 20 percent of current registered voters, though it remains to be seen how many would be eligible to vote, according to census figures and academic estimates. To register, noncitizens must have lived here for 30 days, the same requirement for citizens, and have at least a work permit.