Manila (AFP) - Mario Dimaculangan shares a toilet with 130 other inmates in one of the Philippines' most overcrowded jails, and conditions are getting worse as police wage an unprecedented war on crime.

Security forces have killed hundreds of people and detained thousands more in just one month as they have followed the orders of President Rodrigo Duterte, who has said the top priority at the start of his six-year term is to eliminate drugs in society.

Those detained appear doomed for lengthy stints in an underfunded and overwhelmed penal system, like in the Quezon City Jail where Dimaculangan has wallowed for 14 years while his trial over murder and robbery charges have dragged on.

"Many go crazy. They cannot think straight. It's so crowded. Just the slightest of movements and you bump into something or someone," Dimaculangan told AFP in one of the jail's packed hallways that reeked of sweat.

There are 3,800 inmates at the jail, which was built six decades ago to house 800, and they engage in a relentless contest for space.

Men take turns to sleep on the cracked cement floor of an open-air basketball court, the steps of staircases, underneath beds and hammocks made out of old blankets. Even then, bodies are packed like sardines in a can, with inmates unable to fully stretch out.

When it rains, the conditions are even worse as inmates cannot sleep on the basketball court, which is surrounded by the cells in decaying concrete buildings up to four storeys high.

The cash-strapped national government has a daily budget of just 50 pesos ($1.10) for food and five pesos (11 cents) for medicine per inmate, although with the bulk buying of supplies, Quezon City Jail detainees have a sustainable diet of soup, vegetables and meat.

Pales of water are used to flush the scarce toilets, with the stench compounded by the rotting garbage in a nearby canal.

- Unthinkable conditions -

The jail's management does what it can to make life bearable, such as running dance competitions and other rehabilitation activities.

Story continues

Inmates also say there have been improvements in recent years, particularly with the food and more rehabilitation programmes.

But Raymund Narag, a criminal justice scholar at the Southern Illinois University in the United States, said such conditions were unthinkable in Western nations.

"If this happened in America, there would be a riot every day. Courts would declare these jails unfit for human habitation," Narag told AFP.

The Philippine penal system is the third most congested in the world, according to the University of London's Institute for Criminal Policy Research.

Jails nationwide have nearly five times more inmates than they were built for, according to government data.

And the situation is set to get much worse, very quickly.

Under Duterte's crime war, police have reported arresting more than 4,300 people for drug-related crimes since he took office on June 30.

Duterte has repeatedly urged his law enforcers to do more, calling on them to triple their efforts to eradicate the drug menace that he says is threatening to turn the Philippines into a narco-state.

The population of Quezon City Jail, which houses inmates in a northern district of the Philippine capital who are on trial but not yet convicted, has grown by 300 since Duterte won May elections.

Justice Secretary Vitaliano Aguirre told AFP government was preparing locations for new prisons while courts have been ordered to prioritise the expected deluge of drug cases.

But Duterte has said little about far-reaching reforms needed to fix the systemic problem of overcrowding.

"If there are no new jails, no budget increases, no additional courts and prosecutors, the system will explode. That will be a humanitarian crisis," said Narag, the scholar who speaks from harrowing personal experience.

- Justice delayed -

Narag, 41, was locked up in Quezon City Jail in 1995 as a 20-year-old after being accused of killing a student from a rival college fraternity.

It took seven years for a court to acquit him, which is about the average length of a trial in the Philippines and one of the main drivers of the overcrowding problem.

Dimaculangan is the longest-serving inmate in Quezon City Jail, after being charged with killing a politician's relative in 2001. Dimaculangan is a pseudonym, because his real name cannot be used for legal reasons.

He insists he has a "clear conscience" but cannot get a chance to prove his innocence in court, averaging just one trial hearing a year in a chaotic judicial system notorious for its lack of judges, publicly funded lawyers and court rooms.

Dimaculangan said his spirits used to rise when he was informed of a date for a court hearing, but he had been disappointed too many times with cancellations or postponements.

"Now when they say I have a hearing, I don't care anymore," he said.

With no hopes of freedom, Dimaculangan said he had turned to his Catholic faith and values.

"My purpose is to help my fellow detainees," he said.

"God did not send me here because I am a thief. There are many thieves out there but how come they are not in jail?"