One scorching afternoon this month, inhabitants of a slum in the Philippines capital frantically hurled buckets of water to try to save their homes from a raging fire. Six hours later, their efforts proved to no avail. In a country with a yawning wealth gap, the hardest hit are the hundreds of thousands of urban poor who call the shanties home.

Marybeth Antier, 24, recalled with horror a recent fire that killed six members of her family. At their funeral, their bodies were squeezed into the two caskets she could afford. “I saw the building where we live already ablaze,” she said. “My child was inside but I could not enter anymore.”

For the capital’s thousands of firefighters, the slums are sprawling, unregulated tinderboxes. Tangles of drooping wires run from one electric post to another along the narrow alleys of the city’s most neglected communities, crowded with shacks made from plywood and coconut tree lumber. Fire safety and building codes are unheard of. The Bureau of Fire Protection said the so-called informal settlers complicated efforts to save property and lives.

Fire engines struggle to navigate along pathways littered with vehicles, food carts and stalls. Faulty electrical connections, often dangerously rigged and overloaded by residents, unattended stoves and carelessly tossed cigarettes are the main causes of the fires.

At a fire station near the capital’s biggest park, firefighters are on duty for 24-hour shifts. While they wait, they doze, work out, play sports or perform drills.

Milan Miranda, a firefighter, plans to retire next year after 32 years. He was inspired by his father and uncle to join the ranks, despite the dangers.

Fires quickly engulf the shanty communities, according to Pablo Sy, a pipe-thread machine operator in the Santa Cruz district of Manila. “I was cooking and then we noticed the fire on our rooftop on the third floor. Everyone panicked,” he said, recalling the first fire he experienced. “Everything was burned. We weren’t able to save anything because it spread so quickly.”

Hours after a fire is extinguished, residents salvage whatever they can reuse and rebuild their homes – just as flammable as they were before.