RALEIGH, N.C. — A North Carolina law that prohibits convicted felons from voting until their full sentence is completed — not just their prison time — is being challenged in court with arguments that were successfully used in recent election-related litigation.

Three groups that help ex-prisoners rejoin society, with six defendants barred from voting by their lingering punishments, recently sued in state court. They argued that the restrictions violate the state constitution, unduly hurt African Americans and discourage voting by those who have fulfilled their sentences.

“People work and pay taxes. I just believe that they ought to have the right to vote,” said Dennis Gaddy, co-founder of the Raleigh-based Community Success Initiative and one of the plaintiffs. Now 62, Gaddy once served time behind bars but was unable to vote for seven years after his release because he was on probation.

In North Carolina, prosecutors and state legislators have shown little interest to date in easing the prohibition. But the voting status of felony offenders — both in and outside prison — has gained national attention in recent years. Just last week, New Jersey Gov. Phil Murphy signed legislation that will restore voting rights to about 80,000 people on parole or probation. And a week earlier Kentucky Gov. Andy Beshear signed an executive order restoring rights for more than 140,000 nonviolent offenders who completed their sentences.

While North Carolina is still among 17 states where people are barred from re-registering to vote until they complete probation or other close supervision, a similar number of states restore that right automatically upon release from prison, according to the Brennan Center for Justice.

The stakes can be considerable. Enlarging the voter pool could influence electoral outcomes in closely divided and presidential battleground states such as North Carolina. The Southern Coalition for Social Justice estimated this year that 69,386 people in North Carolina who are completing post-release supervision and probation for felonies couldn’t vote in 2017.

In North Carolina, district attorneys, the court system and election administrators are focusing on more consistent enforcement of the law and ensuring offenders understand the rules so unintended violations are prevented. Voting while still serving felony-related criminal punishments is itself a felony.

“While it is a right to vote, it is a privilege,” said Mike Miller, the district attorney for Lincoln and Cleveland counties, who supports the current restrictions. “I don’t think it’s unfair for society (for felons) to do what that court told them to do before their rights are restored.”

The lawsuit plaintiffs cite portions of the state constitution they say demand equal rights of citizens under the law, prevent the manipulation of elections and bar the poor from being denied the right to vote because they lack money. Some of these constitutional arguments were cited in September when state judges threw out dozens of legislative districts they declared were drawn with excessive partisan bias.

Sometimes offenders are prevented from voting because they’re too poor to cover an array of court costs that are rarely waived by judges, the recent lawsuit says. “It's effectively a poll tax that we're putting on people,” said Whitley Carpenter, one of the plaintiffs' attorneys. She hopes for a ruling in time for next November's election.

Shortcomings of recent enforcement actions were made clear when the State Board of Elections referred hundreds of cases of potential illegal voting during the 2016 elections to local prosecutors.

There have been 459 cases of potential voting by felons without restored rights that the board investigated and referred to district attorneys since 2015, according to board data. The DAs declined to prosecute slightly more than half of the cases, according to an analysis of the data, while another one-third of them were listed as under “DA review.” More than 60 cases have resulted in indictments or convictions.

Scott Thomas, the district attorney for Craven, Pamlico and Carteret counties, declined to prosecute any of the 23 cases sent to him in 2017. Thomas wrote the state board in September citing obstacles he and other district attorneys faced that weakened their cases. Many felons had received bad information about the rules, or were told by local election offices they could still vote because their names were still on the registration list, Thomas said. In his cases, Thomas said, the voters included Democrats, Republicans and unaffiliateds and “were not part of any coordinated partisan political effort to violate the law.”

Government agencies are now working to better ensure felony offenders are removed from voter rolls. And felony probationers sign a form that acknowledges that their registrations have been canceled, Thomas said.

“We hope adherence to existing and new procedures that have been established will assist us in future investigations and prosecutions,” Thomas said in a written statement.

Administrative changes aren’t enough for the litigants, who call the prohibition a remnant of Jim Crow-era laws that discouraged black citizens from the political process. While roughly 20% of the state’s voters are African American, they represent 40% of those still unable to vote because they are on probation or parole or have suspended sentences, the lawsuit says. The six individual plaintiffs include three black residents and a Lumbee tribe member.