The Iranian judiciary has said that human rights abuses have been taking place in the country's jails.
Kazemi's death in custody case is about to resume
A report drafted over several months says prison guards have ignored a legal order banning the use of torture by blindfolding and beating detainees.
It also criticises police for arresting people without sufficient evidence.
Meanwhile lawyer and Nobel prize-winner Shirin Ebadi has complained that she has not been allowed to visit her client, jailed journalist Akbar Ganji.
She has warned that his health is failing.
Relatives of Mr Ganji, Iran's most prominent political dissident, say he has been on hunger strike for about 40 days. He was admitted to hospital last week.
There has not yet been an official response to Ms Ebadi's comments, but the Iranian government recently denied that Mr Ganji was on hunger strike, saying he had been taken to hospital for treatment to his knee.
US, EU and international human rights organisations have all called for his release.
'Thing of the past'
The judicial report was carried out over several months by the head of Tehran's justice administration and has been widely reported in the state media.
The BBC's Tehran correspondent Frances Harrison says it is highly unusual for the Iranian authorities to admit the failings of the judicial system in this way.
Akbar Ganji is said to have lost weight since starting his protest
But the head of the judiciary said the problems had already been dealt with.
"We've taken steps and we can proudly state that all these failings have now disappeared," Abbas Ali Alizadeh told AFP news agency.
"Iranian prisons are among the best in the world."
The report found that some suspects were held in undeclared detention centres run by a plethora of different security organisations.
Inspectors were not allowed access to detention centres operated by the elite Revolutionary Guards, it said.
Among the examples of abuse was the case of a 13-year-old boy jailed for stealing a hen, and another of a woman imprisoned because her husband was on the run.
The report also called for an inquiry into why so many women had committed suicide in one jail.
It comes on the eve of the resumption of a court case concerning the death in custody of the Canadian-Iranian photo-journalist Zahra Kazemi.
The case severely strained relations between Ottawa and Tehran.