President Andres Manuel Lopez Obrador insisted on Friday that Mexico had respected the human rights of hundreds of Central American migrants detained in a robust security force operation the day before.

National Guard troops used tear gas to detain 800 migrants who surged into Mexico on Thursday after wading across a river on the country’s southern border with Guatemala.

“Fortunately, human rights have been respected,” the president told a press conference in Mexico City.

“They were offered shelter, work, everything,” he said, referring to a government plan to offer jobs and shelter to US-bound migrants to encourage them to stay in southern Mexico.

National Guard forces in the southern state of Chiapas on Thursday prevented hundreds of Central Americans, who were trekking towards the city of Ciudad Hidalgo, from continuing their journey.

The troops formed a human fence along a road and closed in on the migrants as some, including women and children, began to panic.

Scuffles broke out as the troops used tear gas to disperse the crowd. Some people knelt on the road and began to pray as they were halted.

The Interior Ministry later said 800 migrants of Central American origin were “rescued” after crossing the border at the Suchiate river.

Mexico faces pressure to keep migrants from crossing its northern border from US President Donald Trump, who last year threatened to impose steep tariffs if the country did not do more to stop a surge of undocumented Central Americans.

Lopez Obrador, popularly known by his initials Amlo, deployed some 26,000 troops to the country’s borders in response.

The president told reporters on Friday that the so-called “2020 Caravan” which began in Honduras two weeks ago was “a non-spontaneous movement. Of course, there is a need, but there is political leadership”.

“Every day we are recommending that human rights be respected, that care is taken that there are no injuries,” said the leftist president.

Amlo said Central American migrants, mostly from Honduras, have received medical care, food and shelter from Mexican authorities.

Human Rights Watch said in its recent annual report that Mexico violated the rights of migrants who travel through its territory to apply for asylum in the US.