Green card holders and immigrants with work visas would be able to vote in mayoral races and other elections in New York City under a bill introduced in the City Council on Thursday.

The legislation would grant the right to vote to nearly 1 million New York City residents who pay taxes in the city but aren’t citizens.

The bill is co-sponsored by multiple council members, including Councilman Ydanis Rodriguez, who represents neighborhoods in upper Manhattan.

“For too long, green card holders and New Yorkers with working permits have been unable to elect their local representatives. New York City has the opportunity to show the nation that we value the contributions and the hard work immigrants bring to our city,” Mr. Rodriguez, a Democrat, said in a statement.

A person must be a resident of the city for at least 30 days before voting, according to the legislation.