Angelita Kamenska, the director of the prison and police reform program for the Soros Foundation in Latvia, said 80 percent of inmates are intravenous drug users. She suspects that relatives and prison staff help to supply drugs to prisoners.
"The staff is very low paid. They get a little more than 100 lats per month, so if they have a chance of making a lot more than that, I think they would take it," she said.
"I don't know how they get drugs in prisons. Maybe personnel is involved, but I have no reliable data on this subject," said the AIDS Prevention Center Director, Doctor Andris Ferdats.
"There are a number of ways they can get drugs into prisons, therefore it is difficult to say whether they get drugs via their relatives or prison staff or their lawyers," said deputy chairman of Riga's central prison, Arvids Upenieks.
Ferdats confirmed that more than 90 percent of the 136 detected HIV carriers had contracted the virus through sharing needles.
"There have been cases where 15 - 20 people, all sitting in the same cell, have shared a needle," said Kamenska.
She is currently working on a project to educate prisoners about the risks involved in sharing needles or having unprotected sex.
"We are working with one prison now, and we would like to make condoms more available to the inmates and also provide them with bleach to clean needles," Kameska said.
"We also need to educate prisoners on the risks involved in sharing needles and how to practice safe sex," she added.
Kamenska said the HIV problem is not something that will stay in prisons. Sooner or later, inmates are supposed to rejoin society.
"It's not just a public health problem but also a criminal justice problem. I think that judges have to think more in terms of public health too. We have many pre-trial prisoners, sometimes waiting for a sentence for one or two years, spending 23 hours per day in a cell. They have very limited contact with the outside world," she said.
The average prison sentence in Latvia is four and a half years - one of the longest in Europe.