NAIROBI — Scores of people were burned to death and many more were injured when a fire from a pipeline explosion engulfed a thickly populated slum on Monday, local officials said.

The cause of the explosion was still unclear, but local officials said it was likely caused by a cigarette butt that ignited gasoline leaked from the pipeline.

The death toll was also uncertain. Red Cross official Pamela Indiaka told the Associated Press that the agency has provided body bags for 75 victims so far. One local television station quoted an official at the scene declaring that he had counted more than 120 bodies, while a local radio station said the dead numbered more than 150. The death toll is likely to rise.

Local television broadcast images of smoldering bodies as firefighters battled the blaze, and showed badly burned slum residents emerging from the flames.

“The scene is bad, there is a large number of people burnt to death,” deputy police spokesman Charles Owino told Reuters. “There are many bodies, we are yet to count them.”

Owino said the fire started after a fuel tank spilled fuel into an open sewer that flows through the slum. As slum residents tried to scoop up the fuel, someone tossed a cigarette into the sewer, Owino added.

On Monday afternoon, firefighters were still trying to control the fire, while ambulances ferried the wounded to nearby hospitals.

Police closed down roads leading into the slum.