Keith R. Judd / The Beaumont Enterprise / AP Photo

President Obama has never been particularly popular in West Virginia , and even though he's an incumbent president running essentially unopposed, Tuesday's Democratic primary in the Appalachian state didn't change that dynamic.

More than 40percent of Democrats voting chose to cast their ballot for Keith Russell Judd, an inmate at the Beaumont Federal Correctional Institution in Beaumont, Texas, where he's doing time for extortion and threats made at the University of New Mexico in 1999.

Judd scored 42.28 percent of the vote - or 49,490 votes - compared with President Obama with 57.72 percent, or 67,562, according to unofficial state results.

Neither Mr. Obama nor Mr. Judd - who is in prison - physically campaigned in the state.

The Obama campaign says Mr. Judd will not be awarded any delegates. The president won more votes than the winner of the GOP primary. Mitt Romney, who scored 51,470 votes.

Four years ago, Democrats note, then-Sen. Obama was clobbered by more than 40 points by then-Sen. Hillary Clinton, D-NY, in the same primary, and it was one of the few states where Sen. John McCain, R-Ariz., improved upon the 2004 performance of President George W. Bush.

West Virginia's Democratic senator, Joe Manchin, who will be on the ballot in November and who has gone to great lengths to project his independence, would not say who he voted for in the presidential primary, according to the Sheboygan Press .

National Democrats suggested a different reason for the president's problems with the electorate in West Virginia.

"You know why we have a problem there," a Democrat said to ABC News. The reporter asked if the Democrat was suggesting many West Virginia voters are racist. Judd is white. "That's right," the Democrat said.

Update: Mitt Romney said in Colorado today that Judd's showing in West Virginia outlines a larger division in the Democratic party.

Romney, who is now the presumptive Republican presidential nominee, lost the primary in Colorado to Rick Santorum. But he said he Republicans will be able to unite against the president.

"If there's a rift in the party, I think it's his," said Romney of President Obama. "I saw in West Virginia, for instance, that an inmate got almost 40 percent of the vote against President Obama for the convention, so I think they got more problems on that side of the aisle than we do on ours."