Maryland's Democratic-controlled state Senate voted on Tuesday to override its governor's veto of legislation to restore voting rights to over 40,000 people with past felony convictions.

Ex-offenders in Maryland are barred from voting until they finish their probation or parole. That could have changed last spring, if Republican Gov. Larry Hogan had signed a bill giving ex-offenders the right to vote as soon as they're released from prison. Instead, Hogan vetoed the bill, setting up a fight with Democratic lawmakers.

When this legislative session opened in January, Democrats signaled that they had the votes to veto the bill. They proved it on Tuesday, delighting civil rights advocates.

Hogan justified his veto at the time by arguing that people with felony convictions should finish their sentences before regaining all of their rights so that they can fully repay society for whatever laws they broke. But civil rights and racial justice advocates argue that restoring voting rights helps ex-offenders reintegrate into society. To that point, the American Probation and Parole Association testified during debate over the bill last year that "civic participation is integral to successful rehabilitation and reintegration."

Civil rights advocates also argue that stripping voting rights from ex-offenders disproportionately affects racial minorities. African-Americans make up 30 percent of Maryland's population but represent nearly three-quarters of its prison population, and 65 percent of those disenfranchised by a felony conviction.

"The Maryland General Assembly has opened up our democracy to the thousands of Marylanders who have returned home from prison and now have the right to vote," said Perry Hopkins, a formerly incarcerated citizen and organizer with Communities United, a social justice group. "I know from experience that this legislation will have a powerful impact on our lives and in our communities."

"From the minute you are released from prison, you are able to pay taxes, you are working to reintegrate back into society in a productive way and you deserve the full rights of citizenship. It’s just that simple," Hopkins continued.

As the Brennan Center for Justice has documented, there is growing momentum for states to allow more people with past felony convictions to vote sooner or more easily once they've left prison. Thirteen other states, plus the District of Columbia, allow all people with felony convictions to vote in elections once they're back in society. On the other side of the felon disenfranchisement continuum are states that permanently revoke voting rights for all people convicted of felonies: Kentucky, Iowa and Florida. Maine and Vermont, in contrast, never strip felons of their voting rights.

The law will take effect on March 10, meaning that all people with past felony convictions who are out of prison will be able to vote in the state's local and federal primaries on April 26.

CORRECTION: A previous version of this article said this law will go into effect on March 6. It actually will go into effect on March 10.

Also on HuffPost:

PHOTO GALLERY Obama's Final State Of The Union