Pollsmoor Prison, Cape Town (CNN) Before we even see the cell, we can smell it. It's the suffocating stench of 86 men squeezed into a room built for 19.

A warden shoves a key into a rusted iron grate. "Get back," he shouts. The inmates stumble backwards to allow the door to swing open.

The cell is a rectangular room with bunk beds stacked three tiers high. In one corner the detainees share a toilet and cold shower, but often the best they can do is a bucket.

Some detainees are dressed in regulation yellow garb, some in various levels of undress. It's summer and it's stifling in here. In winter it's brutally cold. The detainees say they are let outside to exercise once a week at best. Skin diseases are endemic; catching tuberculosis is extremely likely.

And none of the men has been convicted.

"The worst thing is to see how the people must lie lay here on the floor next to each other at night," says Clive, who has been here for two years and two months awaiting trial. "Animals could live like this, but not human beings."

Some, like Clive, get stuck here because of endless trial delays, some because they can't afford bail of as little as 50 Rand (less then $5), some because they are foreign nationals waiting to get deported.

"We don't invite them here as correctional services. They come here because they do alleged crimes," says Cecil John Jacobs, the acting head of the remand facility.

But observers say the problems here are endemic and reflect a South African criminal justice system in crisis.

"It's a 20-year problem, with no end in sight in terms of conditions and the sheer numbers that they detain," says Clare Ballard, an attorney with Lawyers for Human Rights, who are suing the South African government.

A bland facade with a troubling history

In the remand center of Pollsmoor, detainees are often more than 70 in a cell designed for 19.

The chipped green entrance to Pollsmoor Prison welcomes visitors and inmates alike to "a place of new beginnings." Flanked by a luxury wine estate and a wealthy neighborhood of Cape Town, the sprawling complex looks out of place.

But the face-brick and concrete facade predate the suburbs.

Opened in the early 1960s, Pollsmoor's most famous prisoner arrived here in 1982.

Nelson Mandela said the prison had a "modern face, but a primitive heart."

Mandela and top-tier political prisoners were housed together in a single cell and weren't allowed to mix with the common prisoners.

In his autobiography, the future president of South Africa speculated that they were brought to the facility to stop them influencing other political prisoners on Robben Island.

Jacobs, then a low-level warden, saw Mandela only once.

"He was being escorted by guards, someone had to point him out to me," he says. Back then, images of the ANC leader were banned in South Africa.

At the time, wardens of color were often confined to the guard towers and with rights not much better than many of the prisoners they watched over.

The conditions even then were so bad that even Mandela contracted tuberculosis.

Jacobs says that the legacy of apartheid-era prisons -- which were designed to break black prisoners instead of rehabilitating them -- continues to taint the system more than twenty years into democracy.

"This prison was built for people like me," says Jacobs.

A gangster's paradise?

JUST WATCHED South African police crackdown on gangs Replay More Videos ... MUST WATCH South African police crackdown on gangs 02:14

Jacobs leads us through the second floor of the remand center. It's set up as a giant square. In September they evacuated thousands of inmates when an outbreak of leptospirosis struck. Two prisoners died from the rat-borne disease.

Now the hallways are spotless, but authorities have all but given up in controlling another epidemic in the prison system.

"The second floor is where the gang members are," says Jacobs.

"The gangs control this floor?" I ask.

"No, they are separated because we don't want them to influence the younger ones to be involved in gangsterism."

But interviews with several former detainees say gangs practically run the remand center.

They say that the Numbers Gang is entrenched. In many of the crowded cells, members of the 26s and the 28s control access to food, access to the wardens, even the brief chance to stand by the grille to breathe in fresh air.

Athenkosi Myoli is a serial offender who has done several tours of Pollsmoor. He says he joined the 26s gang after his first arrest.

"They raped one of the men in my cell, because he wanted to join that gang," he says.

"I felt a sense of belonging and I needed their protection. Before I got into a gang, I used to sleep on a floor and I used old blankets. Then I got a bed," he says.

In the past they were confined mostly to prisons, but the numbers gangs have now spread their influence out of the prison into crime networks on the outside.

While some detainees arrive at Pollsmoor innocent of their alleged crimes or convicted of less serious offenses, many are sucked into what amounts to a life sentence even before their conviction.

Trying to get them out

"Conditions in remand are worse than when you're convicted," says Athenkosi Myoli, 30, who has been through Pollsmoor several times.

Unlike many prison bosses, Jacob's prime objective is to get his detainees out. He walks around with a one-sheet he wrote on the basics of plea-bargaining. He likes to hand it to detainees when he makes his case.

"It gets them out quicker," he says.

Jacobs readily admits that the conditions for convicted prisoners, who often qualify for privileges, are far better than for those in the remand center. It's a powerful incentive, guilty or not, to get out of the crowded detention cells.

But he is losing the battle.

"If four hundred get released today, five hundred will arrive tomorrow," he says, "Today there are 4,284 detainees here. It's supposed to house 1,619."

The center is often at 300% of capacity. If the statistics are hard to grasp, the reality is so much worse.

Every weekday morning the blue and white police trucks arrive at Pollsmoor. Detainees are brought down, crosschecked, and stacked into the back. The trucks fan out to scores of courts in neighboring towns -- some up to fifty miles away.

But prison officials and former detainees agree that court documents are frequently missing, lawyers don't show up, and key evidence is misplaced.

So the trucks come back, still packed with detainees. And they shuffle straight back to their crowded and diseased cells, where they will spend months or perhaps even years in this prison.

"It's inhumane," admits Jacobs. "The fact is, it's inhumane."