Thousands of felons may have registered to vote in the weeks leading up to the Alabama Senate election on Tuesday, in which Democrat Doug Jones pulled off a surprise victory.

Pastor Kenneth Glasgow, who spearheaded the effort, said on the November 27 registration deadline that at least 5,000 to 10,000 people statewide had registered that month.

"I've got people all over the state registering people,” Glasgow, who is president of The Ordinary People Society (TOPS) advocacy group, told AL.com at the time. “With my TOPS branches in Tuscaloosa, Birmingham, Montgomery, Enterprise, Dothan, Abbeville, Geneva, Gordon, Bessemer, we have a lot."

The law specifies a few dozen convictions “of moral turpitude” that bar felons from voting again, but people who committed crimes not on the list are eligible to vote. The list previously was not clearly defined.

Spencer Trawick, who was convicted of third-degree burglary in 2015, registered to vote in June while still incarcerated, after Glasgow told him he could.

"I'm actually delighted about it, really," Trawick told AL.com. "A lot of people get felonies and they just feel like their whole world is shattered because there's a lot of things that you can't do, but now that they passed that law a lot of people are going to run towards it."

Over the last few decades, civil rights advocates have sought to reinstate the right to vote to felons state by state. According to the National Conference of State Legislatures, Maine and Vermont allow felons to vote even when incarcerated, 14 states and the District of Columbia automatically restore the right to felons upon release, 22 states restore the right after parole or probation with possible fees, and 12 states prohibit felons from voting indefinitely.

A 2014 study found that seven in 10 felons register to vote as Democrats.