The rate of infected people tends to be much higher in prisons than in the rest of population, the Austrian UN rapporteur on torture and inhuman punishment said on the last day of the 18th International AIDS Conference here.
"We have 30 million people that enter and leave prisons every year in the world," he said. "So it means it's not just a prison health problem, it's a public health problem."
Nowak called on governments to distribute condoms and adopt needle exchange and drug substitution programmes for detainees.
Only 11 countries, most of them European, currently have programmes for needle exchange.
In Indonesian prisons, the HIV rate is 21 percent, compared to the 0.2 percent national average.
In the Ukraine, up to 30 percent of prisoners carry the virus, compared to 1.6 percent of the general population.
Currently, politicians and civil societies lacked the will to help prisoners, Nowak said. "As soon as you are behind bars, society is no longer interested in how you are treated."