An automatic voter registration bill cleared the New York state Legislature on Thursday. 

The legislation, which still must be approved by Gov. Andrew Cuomo, would register people to vote when they have contact with various government agencies. The measure passed the state Assembly on Thursday and had already been approved by the state Senate. Both chambers are controlled by Democrats.

If the bill gets the governor's OK, New York would fall in line with other states that have enacted automatic voter registration. 

Nineteen states and Washington, D.C., have automatic voter registration as of April, according to the National Conference of State Legislatures. The organization says New Jersey, Rhode Island and Washington state have all enacted automatic voter registration in the last several years.

State Sen. Michael Gianaris, who sponsored the legislation, says automatic voter registration will make an enormous difference in rising voter participation in New York. 

"While national efforts to establish more roadblocks to voting increase, it is critical we make it as easy as possible for all New Yorkers to exercise their right to vote," he said in a statement.

In a television interview, the New York City Democrat said there are estimates that about 2 million New Yorkers are eligible to vote but are not on the rolls. 

There should be more resources if the state is asking workers at boards of elections to process hundreds of thousands of additional by-mail ballots, he said.

Some Republicans in the state Assembly disapproved of the legislation and prodded the measure during a Thursday debate.

Assemblymember Andy Goodell, a Republican, criticized the types of agencies that were listed to take part in automatic voter registration. 

Assemblymember Mark Walczyk, a Republican whose district includes a swath of Jefferson and St. Lawrence counties, argued the bill will lead to some "non-citizens" being registered to vote, possibly by accident. 

"It's clear that this legislation has a very specific political goal—[it's] certainly not for upstate New York," he said. 

Assemblymember Michael Blake, a Democrat who represents part of the Bronx, took issue with Walczyk's language and said he's sick and tired of listening to the notion that people who are "non-citizens" are just showing up to do the wrong thing.

Senate Majority Leader Andrea Stewart-Cousins issued a statement saying a "common sense" way to help people have their voices heard is to make the registration process easier.

"Voting access is one of the core foundations of our democracy," she said in a statement.

Saad Amer, founder of Plus1Vote, issued a statement saying automatic registration will enfranchise thousands of people. He also argued that youth and people of color are disproportionately impacted by attacks on the electoral system.

"We need to continue to push for the participation of all voices in our elections," he said in a statement.