A significant majority of Americans are opposed to the idea of prisoners being able to vote in national elections, according to a new poll.

In a Hill-HarrisX survey released Thursday, 69 percent of registered voters said incarcerated felons should not be allowed to retain their voting rights. Thirty-one percent favored the idea.

Sen. Bernie Sanders Bernie SandersOutrage erupts over Breonna Taylor grand jury ruling Dimon: Wealth tax 'almost impossible to do' Grand jury charges no officers in Breonna Taylor death MORE (I-Vt.), a front-runner in the 2020 Democratic presidential primary, brought attention to the topic during an April 23 virtual town hall meeting broadcast by CNN when he said he said felons, even those convicted of terrorism offenses, should not have their voting rights taken away while they are in prison.

That position came under intense fire from Republicans and a few Democrats. Sen. Cory Booker Cory Anthony BookerBipartisan praise pours in after Ginsburg's death DHS opens probe into allegations at Georgia ICE facility Democratic lawmakers call for an investigation into allegations of medical neglect at Georgia ICE facility MORE (D-N.J.), who is also seeking the Democratic nomination, accused Sanders of distracting the public from the larger issue of mass incarceration for non-violent felons.

"If Bernie Sanders wants to get involved in a conversation about whether Dylann Roof and the Marathon bomber should have the right to vote, my focus is liberating black and brown people and low-income people from prison," he said in a Tuesday interview with PBS.

Sanders has stood stand by his position, calling felon disenfranchisement a legacy of racism and a means for Republicans to deny voting rights to Americans who are not likely to vote for them.

"When we look at the history of why our country has banned incarcerated people from voting, we must understand that the efforts to rob citizens of their voting rights was a legacy of slavery and continuing racist attitudes post-Jim Crow," he wrote in a series of April 30 tweets. "Our present-day crisis of mass incarceration has become a tool of voter suppression."

Vermont and Maine are the only states that allow incarcerated felons to vote. Under federal law, voting eligibility is administered by states.

In the Hill-HarrisX survey, expanding voting rights to prisoners was more popular than lowering the voting age, which had as much as 25 percent support, or granting voting rights to illegal residents, an idea backed by only 18 percent of respondents.

The poll found that allowing legal non-citizen residents to vote in national elections was the most popular voting-expansion idea, but with only 35 percent in support.

The Hill-HarrisX survey was conducted online April 27-28 among a statistically representative panel of 1,002 voters. It has a 3.1 percentage point sampling margin of error and a 95 percent confidence level.

—Matthew Sheffield