BADALONA, Spain (AP) — Mamadou Dieye was talking to his family back in Senegal when he heard shouts of distress downstairs. Smoke quickly followed the screams, and in the ensuing panic Dieye watched in horror as several fellow squatters plummeted from three stories high to escape the fire billowing below.

“I saw that a man who hit the ground wasn’t moving, and I said, ‘He's dead,'” Dieye told The Associated Press on Thursday hours after a fire had engulfed the abandoned industrial complex where he and over 100 other African migrants lived in precarious conditions.

Authorities for northeast Spain said that firefighters had confirmed three deaths while continuing their search in a building whose roof partially collapsed when a fire raged through it Wednesday night. Around 20 people had to be treated by medics, including three people in critical condition at local hospitals.

Catalonia's regional interior minister, Miquel Sàmper, said that authorities would investigate if the fire was “fortuitous or intentional.”

Most of the injured were being treated for trauma after they jumped from the building, emergency coordinator Francisco Tebar told Spanish state broadcaster TVE. Around 30 people were pulled from windows before the roof collapsed at various points. Televised images showed a group of people huddling together on the roof as flames illuminated the thick smoke surrounding them in the night.

Catalonia’s acting regional president, Pere Aragonès, said that around 60 people have been accounted for so far, but that the group of buildings could had been occupied by more than 100 squatters.

Work was underway to fully extinguish the flames and stabilize the structure to safely access it, Aragonés told TVE. Several drones and sniffer dogs were being used to look for anyone else who might be trapped in unstable parts of the complex.

The regional chief said that many occupants were believed to be in Spain without a legal residence permit and had left the scene without being attending to my medical or support staff.

“This has been a tragedy above the economic misery in which many of the people already found themselves,” Aragonès said.

The building had been occupied for at least eight years, said Xavier García Albiol, the Badalona mayor, adding that the city hall had started work to empty the building after drug sales and petty thefts increased in the area during the past two years, provoking problems with other neighbors. García Albiol was absolved of charges of using racist language against Romanian immigrants to his city several years ago.

Dieye, 43, said that unlike most of his housemates, he has his Spanish residency and work permits after spending 20 years in the European country. He had been forced to give up a room he was renting in Barcelona and come to the squat in the neighboring town of Badalona after losing his job as a cook, he said. Many restaurant professionals have been thrust out of work due to the COVID-19 confinement measures and the resulting economic downturn.

While he said he just got out past the flames by taking the stairs instead of leaping through the windows, he said that a woman he was trying to help succumbed to the smoke. He feared for her life.

“I was seconds from dying,” Dieye said.

Another survivor, Ousmane Ndiaye, who has been in Spain for 14 years, said he and fellow Senegalese Matiga Thiam had been surviving on the little money they made from trading in scrap metal they scavenge in Badalona, a working-class town of 200,000 inhabitants on the Mediterranean coast bordering with Barcelona.

Ndiaye calculated that around 150 people from Senegal, Ghana, Gambia, and other countries were living in the complex because access to housing is difficult, especially for migrants still seeking to regularize their stay in Europe.

“There are many people who do not want to rent a place for you. There are people (in the building) who have work but cannot rent an apartment. And if you don’t have a place to sleep, you come here,” Ndiaye said.

The pair of friends said they couldn’t forget the image they saw as they ran out past the building in flames, with other occupants jumping from windows.

“They couldn’t breathe,” said Thiam. “If there is a fire, you know that if you don’t jump you will die. You just take a gamble.”

Copyright 2020 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed without permission.