Massachusetts could register and vote within the same day, under a bill the state's elections chief is proposing.

Bill Galvin, who as secretary of the commonwealth oversees Bay State elections, called on lawmakers at the Statehouse to act quickly and pass the legislation.

Current law says voters must be registered at least 20 days before an election in order to be considered eligible, though Matthew Segal, legal director of the ACLU of Massachusetts, noted a judge ruled last year that the 20-day deadline violates the state constitution.

The ACLU and its Massachusetts outfit brought the suit on behalf of voting rights organizations.

"Over the past few years, my office has worked to bring online voter registration, pre-registration, and early voting to Massachusetts," Galvin said in a statement. "This is yet another way to make it easier to cast a ballot for any eligible citizen who wants to vote."

Galvin's bill, if enacted, would go into effect in 2019, ahead of the 2020 presidential election.

In this year's election cycle, Galvin is gearing up for a primary challenge from fellow Boston Democrat Josh Zakim, a city councilor. Galvin has held his current post since 1995.

Zakim criticized Galvin after the secretary announced the bill.

"Although he purports to support enabling residents to register to vote on Election Day, he is actively trying to overturn a Superior Court decision that would allow for it," Zakim said in a statement.

"Likewise, he says on one hand he wants to increase voter turnout, but he schedules the [2018] primary for the day after Labor Day," Zakim added. "Despite his best efforts, Bill Galvin won't be able to pass himself off as a reformer when he has a 24-year record of upholding the status quo."