A Nigeria court has ruled that prisoners should be able to vote in all national and local elections.
The ruling from the Federal High Court in Benin, Edo State, comes ahead of closely-fought general elections in February 2015.
Earlier this year, there were nearly 57,000 prisoners across the country, the Nigerian Prisons Services said.
Almost 70% of these have not been convicted of a crime – many wait for their trials for several years.
“To deny inmates the right to vote is unconstitutional, illegal, irregular, unlawful, null and void and of no effect whatsoever,” Justice Mohammed Lima said on Tuesday.
“Being an inmate is not an offence that impedes their registration and voting right under section 24 of the Electoral Act,” he added.
The judge ordered Nigeria’s election commission to update its register of voters to take into account the prison population.
The presidential election is said to be the closest since the end of military rule in 1999.
President Goodluck Jonathan is expected to face his strongest challenge from former military ruler Muhammadu Buhari.
Mr Jonathan won by a landslide against Mr Buhari in 2011, amid claims of rigging.
Earlier this week, an election official warned that some 1.5 million people forced from their homes by an Islamist insurgency in the north-east may not be able to vote.