Since Rodrigo Duterte took office as Philippine president at the end of June, the war on the drug trade he promised to initiate has claimed thousands of lives — some 2,300 according to official statistics, more than 4,000 by other accounts.

But the crackdown on drugs and drug use in the Philippines has ensnared hundreds of thousands of other people.

And some of those people languishing in jail consider themselves lucky.

"It's safer here," Jason Madarang, who waits face trial on a charge of drug use in Quezon City Jail, east of Manila, told Reuters. "Outside, if the police want to shoot you, they shoot you, and then say you're a drug pusher."

Quezon City Jail was built for 800 inmates, but its population was more than 4,000 at a point in mid-August, packed with suspects picked up in the anti-narcotics effort. The jail insisted that some prisoners be relocated.

"If we hadn't done that, we'd have 5,000 inmates by now," Lucila Abarca, the prison's community-relations officer, told Reuters. The jail now holds more than 3,400 people, two-thirds of whom are there for drug-related offenses.

That Duterte's government's "aggressive campaign against criminality and drugs" has expanded the prison population was to be expected, Jesus Hinlo, the undersecretary for public safety at the Philippines' Department of the Interior and Local Government, told Reuters.

"The solution is ... to build new and bigger jails," Hinlo added, saying that a lack of funds made doing that harder.

Below, you can see a selection of Reuters photos documenting the squalor in which some victims of the Philippines' drug war find themselves.

"Welcome to Hell" is written on the stairs leading to Jason Madarang's cell block inside Quezon City Jail in Manila, Philippines, October 19, 2016.

"I'm lucky to be here because so many people have been killed," Macronino Maximo, Jason's cellmate, told Reuters. "There are many police on the outside," he said, gesturing to the seething, dungeon-like cell. "Here, there are none."

Comforts are few, and the poor conditions exacerbate tensions. In July, contaminated water caused an outbreak of cholera.

Duterte remains popular, garnering a +64 net approval rating in a survey done after his first 100 days in office. Many Filipinos have expressed support for Duterte's anti-drug campaign, but some have charged it has disproportionately targeted the country's poorest and most vulnerable people.

An inmate covers his head as he passes the time inside Quezon City Jail in Manila, Philippines, October 19, 2016.
REUTERS/Damir Sagolj

"It's hell here, mentally and physically," said Dennis Charles Ledda, a 29-year-old prisoner who sleeps in the crawl space under another man's bunk. "Truly, I used drugs," he told Reuters. "But if I could get out of here I'd do anything to fix my life."

An inmate who is about to be released wears a wristband with the name of Philippine President Rodrigo Duterte at Quezon City Jail in Manila, Philippines, October 18, 2016.
REUTERS/Damir Sagolj