Surveillance footage from inside the immigration detention center in northern Mexico near the U.S. border where 38 migrants died in a dormitory fire appears to show guards walking away from the blaze and making no apparent tattempt to release detainees.

The fire broke out when migrants fearing deportation set mattresses ablaze late Monday at the National Immigration Institute, a facility in Ciudad Juarez south of El Paso, Texas, Mexican President Andrés Manuel López Obrador said.

Authorities originally reported 40 dead, but later said some may have been counted twice in the confusion. Twenty-eight people were injured and were in “delicate-serious” condition, according to the National Immigration Institute.

The security footage, which was broadcast and later authenticated by a Mexican official to a local reporter, shows at least two people dressed as guards rush into the frame, then run off as a cloud of smoke quickly filled the area. They did not appear to attempt to open cell doors so migrants could escape the fire.

Authorities were investigating the fire, the institute said. The country’s prosecutor general has launched an investigation, Andrea Chávez, federal deputy of Ciudad Juarez, said in a statement. Mexico’s National Human Rights Commission also was alerted. 

What caused the fire?

López Obrador said the fire was started by migrants inside the facility after they learned they would be deported.

“They never imagined that this would cause this terrible misfortune,” López Obrador said.

The immigration institute said it “energetically rejects the actions that led to this tragedy,” without further explaining what those actions may have been.

Video shows guards leaving as fire starts

The video footage shows the area in the facility filled with smoke within seconds, obscuring the view of the camera. In the video, two people dressed as guards are seen rushing into the frame, then walking quickly off as migrants remain behind bars. At least one migrant is seen kicking at a cell door while flames grow. 

Mounting tensions in Ciudad Juarez

Tensions between authorities and migrants had apparently been running high in recent weeks in Ciudad Juarez, a major crossing point across the border from El Paso for migrants entering the United States. Shelters in the city are full of migrants waiting for opportunities to cross or who have requested asylum in the U.S. and are waiting out the process.

On March 9, more than 30 advocacy organizations and migrant shelters wrote an open letter denouncing the criminalization of migrants and asylum seekers in Ciudad Juarez and accusing authorities of excessive force in detaining migrants.

Mexico’s migrant facilities have seen protests from time to time as the American government has pressured the country to ramp up efforts to reduce the number of migrants coming to United States.

Frustrations reached a fever pitch this month when hundreds of migrants, most of them Venezuelan, heard false rumors that the U.S. would allow them to enter and tried to cross an international bridge to El Paso. In October, migrants rioted at a Tijuana immigration center, and in November, dozens rioted at the country’s largest detention center in the southern city of Tapachula.

A girl lights candle during a vigil for the victims of a fire at an immigration detention center that killed dozens in Ciudad Juarez, Mexico. According to Mexican President Andres Manuel Lopez Obrador, migrants fearing deportation set mattresses ablaze at the center, starting the fire. (AP Photo/Christian Chavez) ORG XMIT: XMC156

Officials:2 migrants found dead in freight train near US-Mexico border

Latest Gov. Abbott-Biden standoff:Texas didn’t get permits for razor-wire fence at border

Contributing: Hector Garcia De Leon and Cesar Brioso, USA TODAY; The Associated Press