By Alex Last
BBC News, Lagos
Prisons in Nigeria are notorious, with many of the country's 40,000 inmates crammed into massively overcrowded, dilapidated cells in old prisons.
Many inmates have never been convicted of a crime
The most shocking statistic is that some two thirds of all the prisoners in Nigeria have not been convicted.
Many have to wait for years for the case to come to court.
Inside prisons, conditions are squalid and disease is rife; tuberculosis is common.
Human rights groups say inmates often fall ill, some die from a lack of adequate medical treatment.
Many cells have no beds or mattresses, the inmates sleep on concrete floors. Securing a blanket or a mat to sleep on is a luxury.
Although official statistics suggest there is little overcrowding - despite the evidence - the government does accept that there are huge problems.
It says there have been some improvements, however, including a fall in the prison death rate from 1,500 a year in the late 1980s to 89 a year in 2003.
Prisons have also been opened to humanitarian organisations.
Food is basic and the ration small, usually a bowl of beans in the morning and cassava in the afternoon and evening. Some rely on their families to bring food to the prison.
Former inmates say money can buy better conditions - the guards taking their cut.
Last year the US State Department wrote: "Prison officials, police, and security forces often denied inmates food and medical treatment as a form of punishment or to extort money from them."
Prison reform groups say that in the last year, there have been at least five prison riots.
Some people have waited for their trials for more than a decade.
Their files had been lost, they were forgotten.
The problem was so glaring that the government announced in January that all those who have spent three to 10 years awaiting trial will have their cases reviewed for immediate release.
Those who had already spent more time in prison than their prospective sentences would be let out, along with the elderly, the terminally ill and those with HIV.
In total, that amounted to 25,000 inmates. But this amnesty has yet to be implemented.
The president of human rights group the Civil Liberties Organisation, Titus Mann, said the government had failed to deliver on promises of prison reform.
"Decongesting the prisons is the biggest challenge facing the prison system. But I am sceptical the government could do it quickly."
A former armed robber turned priest, Pastor Kayode Williams has set up a prisoner rehabilitation project and is on the presidential committee for prison reform and rehabilitation.
He says there has been some improvements, but inside prison the attitude of the guards has to change.
"One of the key needs is to train the prison staff. They must treat the inmates with a human face. Prison should be about reform not just punishment."
He says his organisation has helped over 2,500 former inmates, from murderers to fraudsters.
They are given training in agriculture and craftwork to help them earn a living.
Pastor Williams says he set up the organisation because he saw that many of his fellow inmates were repeat offenders.
Pastor Williams wants ex-prisoners to be treated as humans
Once branded a criminal, he said, former inmates were outcasts in Nigerian society.
"Many were coming back to prison, because they were not properly rehabilitated. They had no where to go. Society had rejected them, their family had rejected them.
"When I came out people were very hostile. No one would receive me or walk with me.
"So I tell them, don't expect society to roll out the red carpet - but don't get discouraged."
But for those inside, the struggle to survive is the main concern.
Even if the government does succeed in reducing overcrowding in the prisons, it needs to address the failures of a justice and penal system which has allowed thousands of Nigerians to be in prison for years without trial.