MEXICO CITY -- Mexico's immigration head will face criminal charges in a fire that killed 40 migrants in a detention centre last month, but President Andres Manuel Lopez Obrador said Wednesday that he will not dismiss the official known for his hard line on northbound migration.

Obrador's decision to keep Francisco Garduno as head of the Mexican Immigration Institute appeared to conflict with the federal Attorney General's Office announcement late Tuesday to charge Garduno in connection with the blaze.

That shows both some separation of powers in Mexico and the conundrum faced by the Mexican government. Lopez Obrador and his administration are struggling with U.S. pressure to slow the flow of migrants while the international community calls on them to treat migrants humanely and safely.

Lopez Obrador's comments came on the same day that relatives gathered in rural Guatemala to hold funerals for some of the victims of the deadly fire.

Thousands of people gathered in the Guatemalan village of Chicacao for the funeral of Francisco Gaspar Rojche Chiquival and his uncle Miguel Rojche Zapalu, two of the 19 Guatemalans who died of smoke inhalation or burns in the March 27 fire.

"I am destroyed, I am wounded," said the younger man's father, Manuel Rojche. "This is a very hard blow."

The family had handed over title to their land to raise the US$15,000 that smugglers demanded to get Rojche Chiquival to the United States. They stand to lose the land. The only possession the 21-year-old left behind -- his beloved motorcycle -- travelled with his coffin in the procession to the local cemetery.

The men died after a migrant set fire to foam mattresses in protest, and guards fled without opening the cell doors.

"That president is a coward," Manuel Rojche said of Lopez Obrador. "How can you treat people like that, not even an animal ... much less a human being."

Garduno, a lawyer and criminologist, was called to take over the immigration job in June 2019 as Mexico was under pressure from the Trump administration to decrease the flow of migrants.

The Mexican immigration institute has been hit for years with repeated complaints of human-rights violations and unhealthy conditions in centre for migrants, conditions including inadequate ventilation, clean water and food. There also have been numerous corruption complaints. Under Garduno, the institute took a harder line.

Calls have come from within Mexico, and from some Central American nations, not to stop the case of last month's fire at the five low-level officials, guards and a Venezuelan migrant already facing homicide charges.

Federal prosecutors said late Tuesday that Garduno was remiss in not preventing the disaster in Ciudad Juarez despite earlier indications of problems at his agency's detention centres. Prosecutors said that government audits had found "a pattern of irresponsibility and repeated omissions" in the immigration institute. However, charges being brought in Mexico, especially against public officials, do not always result in prison time.

On Wednesday, Lopez Obrador said that even though the Attorney General's Office was investigating Garduno, prosecutors had revealed few details and it was not exactly clear how they would charge him.

"We are going to wait and we are going to make decisions in the (right) moment," Lopez Obrador said.

The president defended Garduno, saying "his work is good in general; he has always had good performance," despite "the misfortune" that happened in Juarez.

Garduno has been close to Lopez Obrador since the latter was Mexico City mayor, and Garduno has overseen a strategy to contain migrants in southern Mexico with the help of the National Guard, which has been criticized as the start of a militarization of Mexico's immigration policy. It included placing retired or active military officers in leadership positions inside the immigration agency.

Garduno's predecessor at the immigration institute, sociologist Tonatiuh Guillen, said the prosecutor's decision "is a good signal, given that the expectation at first was just an investigation of those who were directly responsible."

Guillen said, however, that keeping Garduno in his position generated an "unnecessary tension" because he should have been dismissed in order to make the case against him more straightforward.

Guillen resigned in 2019 because of his disagreement with hardening migration policy, as Washington was demanding.

Anger in Mexico initially focused on two guards who were seen fleeing the March 27 fire, without unlocking the cell door to allow the migrants to escape. But Lopez Obrador had said earlier Tuesday that they didn't have the keys.

A video from a security camera inside the facility shows guards walking away when the fire started in late March inside the cell holding migrants without making an effort to release them.

The Attorney General's Office said several other officers will also face charges for failing to carry out their duties, the statement said, but prosecutors did not explain what specific charges or identify the officials.

An immigration official said on Wednesday morning that Garduno had not yet been called to testify. The official asked for anonymity because was hot authorized to speak on the record.

Complaints about corruption and bad conditions at Mexico's migrant detention facilities have never been seriously addressed: Prosecutors said that after a fire at another detention center in the Gulf coast state of Tabasco killed one person and injured 14 in 2020, the immigration agency knew there were problems that needed to be corrected, but alleged they failed to act.

The fire case could also put Lopez Obrador in a difficult position on his promise not to tolerate any corruption. Prosecutors said they are investigating a no-bid contract to the firm providing private security at the Ciudad Juarez facility. Investigators found a series of irregularities in the company's work, but prosecutors did not specify if Garduno was involved in that contract's approval.

One migrant allegedly set fire to foam mattresses at the detention centre to protest detention conditions and what he apparently thought were plans to move or deport the migrants. Mexico has returned the bodies of 31 migrants to their home countries.

Dozens of mourners turned out on the dusty streets of the village of Proteccion, in Honduras, where the coffins of three local men arrived from Mexico.

Cindy Umaña recieved the coffin of her brother, Edin Umana, in her house. The only thing she could ask was that those responsible be prosecuted.

"I know that locking them up will not give us our relatives' lives back," Umana said. "But at least we will know that justice has been done."

Complaints about corruption and bad conditions at Mexico's migrant detention facilities have never been seriously addressed: Prosecutors said that after a fire at another detention center in the Gulf coast state of Tabasco killed one person and injured 14 in 2020, the immigration agency knew there were problems that needed to be corrected, but alleged they failed to act.