(CNN) -- Twenty-six people were killed and 15 were rescued from a fire at a rehabilitation center in Lima, Peru, the state-run Andina news agency reported.
The fire was controlled by firefighters by Saturday afternoon.
The cause of the fire was under investigation, the fire department said, though witnesses said a mattress was set on fire during a melee inside the building.
The victims were trapped inside the building and died from asphyxiation, Peru's fire chief, Antonio Zavala said.
The building may have been a clandestine rehabilitation center, and many people were concentrated on the first floor, which lacked escape routes, Zavala said.
Some 40 people were housed in a small space with only one exit that was locked with a chain. Bypassing the heavy metal door was the biggest challenge in the rescue, he said.