Image copyright AP Image caption The fire destroyed more than 150 homes

A fire in a Philippines shanty town has sparked violent clashes between residents and firefighters.

Officials said residents in the San Juan City slum, east of Manila, were frustrated with the slow response of the emergency services and tried to grab hoses to save their homes.

In the ensuing violence, one person was beaten to death after apparently being mistaken for a firefighter.

The fire destroyed dozens of homes and left hundreds of people homeless.

GMA news reported that some residents had threatened firefighters with guns and threw stones at the fire engines.

"Our fire engines had difficulty entering the narrow streets that were blocked by parked cars and carts," fire chief Santiago Laguna told local media.

"Our firefighters had to drag the hoses into the alleys, where they were attacked.

"[The residents] started grabbing hoses from our firefighters, who could not do anything as they feared for their own safety."

Millions of Filipinos live in shanty towns around the capital city.

Cramped conditions and poor construction leave the areas exposed to fires and natural disasters.