
San Pedro prison, the biggest in Bolivia's main city, La Paz, is home to about 1,500 inmates.
Once you pass the thick walls and the security gates, any resemblance to a normal jail disappears: there are children playing, market stalls, restaurants, hairdressers and even a hotel. It looks more like the streets of El Alto, Bolivia's poorest neighbourhood that sprawls on the outskirts of La Paz, than a prison.

The prison is divided into eight sectors and facilities range from miserable to luxurious.
There are no guards, no uniforms or metal bars on the cell windows. This relative freedom comes at a price: inmates have to pay for their cells, so most of them have to work inside the jail, selling groceries or working in the food stalls. Others work as hairdressers, laundry staff, carpenters, shoe-shine boys or TV and radio repairmen.

"If you have money you can live like a king," an inmate told me. Money can buy you accommodation in the "posh" sections of the prison - one of the best is Los Pinos. Here, cells are spacious and have private bathrooms, kitchen and cable TV. Outside, they have billiard tables, kiosks selling fresh juice, and food stalls. Cells cost between $1,000 and $1,500 and are bought for the duration of an inmate's sentence.
In the poor areas of the prison, inmates have to share small cells.

"I have been an outcast since I was a child. My life was spent in correctional centres. I was sent there 27 times," says Victor Calatayud, aka El Pecos, in the Los Alamos sector.
"This is my eighth time here. I know this place so well that I have written a guide to it, including its history, anecdotes, and even a guide to prison jargon."
Tourists used to be allowed in, but the tours were stopped because many people were coming to buy cocaine, said to be the purest in Bolivia.

About 200 children live here with their fathers. The younger ones go to one of the two nurseries inside the jail, while the older ones go to schools outside. Outside they suffer discrimination - inside they are afraid of violence and sexual abuse. Their mothers are often in other jails or have abandoned them.
"It's tough for them here, but at least we can try to protect them and give them a sense of family. Outside they would be completely on their own," says the father of Manuel (right).

Cell 25, an area of 4 sq m, has been Hugo's home for the past five months.
"I can't afford to buy it, so I rent it for 80 bolivianos ($10; £6) a month. I am awaiting trial. I could be here another three months or two years - nobody knows. I am accused of drug trafficking. I have this cell to myself - it has a kitchenette and a tiny window to see the sun, so I guess it's not that bad. This is my first time inside. The toughest thing is not seeing my wife, who is in another jail," he says.

"Not everyone likes the food in the canteen, so we sell snacks and sandwiches here for inmates and for their families when they come to visit," says Pedro, the owner of this food stall.
"The chorizo sandwich with tomato and salad costs three bolivianos (20p). With the money I make, I pay my rent and keep a few bolivianos for cigarettes."

"My name is Freddy Guanto Pantaluka Saca. I am here for killing people. I have been here for 25 years - I will never be free, the judge forgot about me!" this man says, smelling strongly of chicha (a local alcoholic drink)
In a mix of Quechua and Spanish, Freddy shouts something about suffering.
Few of the inmates here are convicted killers - 80% of them are here for drug-related offences. Only about 25% of all prisoners are actually serving a sentence - the rest are awaiting trial.

Violence in San Pedro is relatively contained during the day, but things can get bad at night, when inmates steal from each other and fight with knives. The police do not go inside or interfere in any way.
According to prison figures, there are about four deaths a month from both natural causes and "accidents".
Prisoners are expected to resolve their own problems through section representatives elected democratically.

The mural reads: Welcome to the football pitch... Freedom and justice for everyone. This is the prison's biggest yard and it doubles up as a small football pitch. Every sector has a team and tournaments are held regularly, with bets of more than $20,000 a year.
Good players are sought after and signings by teams from the wealthier sections are not unheard of.
"It is the same as outside - if you are good, you can make more money with your feet than with your brain," an inmate jokes.