The sudden increase has created "unsustainable conditions" in many of Mexico's approximately 60 centres, said Salva Lacruz, a coordinator at the Fray Matías Human Rights Centre, a migrants' advocacy group in the southern city of Tapachula.
"Everything's a disaster," he said.
Under pressure from critics, including the government's human-rights ombudsman, the López Obrador administration has acknowledged in recent days the sorry state of the detention system and has promised improvements.
In the meantime, however, things remain grim.
Interviews with several asylum-seekers released in recent days from a large detention centre here in Acayucan, a small city in southeastern Mexico, painted a picture of hardship and scarcity.
People slept on thin mattresses wherever they could find space. Others didn't even have that, and stretched out on the ground. They spoke of poor-quality food — and not enough of it. And some said that even the drinking water would frequently run out.
One Cuban migrant said that right before he was detained, he had been mugged and injured in southern Mexico. But in the detention centre, he said, he was denied medical attention for eight days. He was eventually taken to a hospital, he said.
The migrants described filthy conditions, which would improve only when delegations of human-rights observers or others were scheduled to drop by. In advance of the visits, the detention centre's staff would scour the facility.
"You could get sick from being there," said a Honduran asylum-seeker who gave only his surname — Escobar — out of concern for his safety.
Conditions within the detention system have been criticised for years. But the failings have become more evident in recent months amid the enforcement crackdown.
In April, after overseeing a sharp drop in detentions and deportations during his first four months in office, Lopez Obrador suddenly started to get tough on illegal immigration. Spurred by President Donald Trump's threats to close the border with Mexico to thwart illegal immigration, the Mexican government moved quickly to increase detentions and deportations.
These efforts accelerated in June when Trump threatened to impose punitive tariffs on Mexico.
But while the Mexican government may have been quick to respond to Trump's demands, it apparently made little effort to prepare its detention network for the resulting stress.
The National Migration Institute, which oversees the migrant detention system, had already been struggling in the face of Lopez Obrador's effort to bring down the cost of government. As part of this austerity program, the agency's budget was cut 23 per cent this year.
Since spring, reports of the deteriorating conditions have multiplied.
"There is concern about the violation of rights for people who will inevitably go to immigration stations," the Citizens Council of the National Migration Institute, a group that advises the migration agency, said in a statement in mid-June. "Due to the increase in immigration containment, the stations become saturated, causing overcrowding and precarious conditions."
Yet the situation has barely improved.
In an interview in his office, Edgar Corzo Sosa, rapporteur for migrant issues at the National Human Rights Commission, an autonomous government agency, said that in "a normal migration flow," space in the system would be sufficient. But Mexico is experiencing what he called "an intense migration flow."
Corzo picked up a document — the government's daily population count for each of the detention centres — and began citing statistics. Some of the facilities were way over capacity.
In the northern border city of Reynosa, 210 migrants were crowded into a facility designed for 50, Corzo said. In a centre in Palenque, there were 210, nearly double the capacity. Some 86 migrants were jammed into another centre fit for 30.
During a recent visit to a centre in the southern state of Chiapas, Corzo documented about 400 detainees in a space meant for no more than 80. Another Chiapas shelter, Siglo XXI in the city of Tapachula with a capacity of about 960, saw a daily average of more than 1,400 in recent months, at times reaching about 2,000, according to government statistics from the first six months of the year.
"Tell me if this isn't problematic," he said. "There are many complications."
A few days earlier, a Salvadoran migrant had died while being held in an improvised detention centre in the offices of the National Migration Institute in the northern city of Monterrey. It was a rare death of a migrant inside the nation's detention system. Corzo said authorities were investigating the cause.
Migration officials have also been wrestling with a large and increasing number of child migrants traveling either unaccompanied or with families.
About 130 per cent more migrant children from Central America were detained during the first six months of the year than during the same period last year, according to the National Migration Institute.
In May, a 10-year-old Guatemalan girl died after falling from a bed bunk in a major detention centre in Mexico City, officials said. Authorities are still investigating the cause and whether she received adequate medical attention.
Marcelo Ebrard, Mexico's foreign secretary, owned up to the poor conditions of the detention centres: "They are very bad," he said during a news conference.
"The assessment presented to us is terrible — the drains do not work, the abandoned bathrooms," he said. "An immense, enormous effort has to be made. It's not so much the money but the commitment."
The López Obrador administration has earmarked about US$3.1 million to improve several major detention centres in southern Mexico and says it intends to renovate centres in the north as well.
But migrants' advocates point out that the government has not made an equivalent commitment to expanding the resources of the government's overburdened asylum agency, which was on the verge of collapse even before the surge in detentions.
"In the budget allocations, you can measure the political will," said Ana Saiz Valenzuela, general director of Sin Fronteras, a migrants' advocacy group in Mexico City.
Corzo said he hoped the López Obrador administration follows through on its promise to improve conditions in the centres and its treatment of detainees.
"It's a new government," he said. "It's a new opportunity to make big changes."
But, he acknowledged, "there are big challenges."
Written by: Kirk Semple
Photographs by: Luis Antonio Rojas
© 2019 THE NEW YORK TIMES