NEW YORK (Reuters) - How popular is President Barack Obama in West Virginia? Just slightly more so than federal Inmate No. 11593-051, who received nearly 43 percent of the vote in West Virginia's Democratic primary on Tuesday.

While the president was the undisputed victor - he took over 57 percent of the vote - Obama's victory was colored by the fact that his opponent, Keith Judd, got 57,081 votes even though he is serving a prison sentence at the Federal Correctional Institution in Texarkana, Texas.

Judd, who is 53, is not due to be released until June 24, 2013 -- a full five months after the next presidential inauguration, according to the Federal Bureau of Prisons.

To be eligible to run, Judd had to file a Certificate of Announcement with the state by January of this year and pay a $2,500 filing fee, a spokesman at the state's Elections Division said.

(Reporting By Edith Honan; Editing by Cynthia Osterman)