Mexican National Guard soldiers detain Central American migrants trying to cross the Rio Grande into the United States at Ciudad Juarez

Mexico has deployed nearly 15,000 soldiers and National Guardsmen to its border with the United States, the army chief said Monday -- admitting they are detaining migrants who try to cross, after the policy triggered backlash.

Under pressure from US President Donald Trump to slow the surge of Central Americans crossing the border, Mexico promised earlier this month to reinforce its southern border with 6,000 National Guardsmen, but had not previously disclosed the extent of the crackdown on its northern border.

"We have a total deployment, between the National Guard and army units, of 14,000, almost 15,000 men in the north of the country," Defense Minister Luis Cresencio Sandoval said at a press conference alongside President Andres Manuel Lopez Obrador.

Asked whether those forces were detaining migrants to prevent them from crossing, Sandoval replied: "Yes."

"Given that (undocumented) migration is not a crime but rather an administrative violation, we simply detain them and turn them over" to immigration authorities, he said.

The government has faced criticism for stopping migrants from crossing the US-Mexican border. National Guardsmen and police have been patrolling the border in groups.

The policy is a shift from previous practice. The Mexican security forces have long detained undocumented migrants as they travel in the country, but had not typically stopped them from crossing the US border in the past.

The practice caused an outcry after an AFP photographer documented last week how heavily armed National Guardsmen in Ciudad Juarez forcefully stopped two women and a young girl from crossing the Rio Grande river into the United States.

In some cases, migrant families have been separated when some members manage to cross the border and others get detained on the Mexican side.

- 'Doing the US's dirty work' -

Mexico "is doing the United States's dirty work," Francisco Javier Calvillo, the head of the migrant shelter Casa del Migrante in Ciudad Juarez, told journalists in reaction to the new practice.

"That's not the army's job, the federal police aren't trained to deal with migrants.... This policy is a clear violation of human rights," added Calvillo, a Catholic priest.

Independent Senator Emilio Alvarez Icaza, secretary for the upper house's human rights committee, likewise criticized the use of Mexican forces for border patrol duty.

"In the end, Donald Trump got his wall, and the government and people of Mexico are paying for it: a military wall on the borders," he said in comments reported by newspaper Reforma.

Fleeing chronic poverty and brutal gang violence in their home countries, the Central Americans crossing Mexico in a bid to reach the United States mostly lack the papers needed to migrate legally.

However, international law protects the right of undocumented migrants to cross international borders to request asylum. And the US courts have upheld their right to do that anywhere along the border, whether or not it is an official crossing.

There has been a large increase in such migrants crossing the US-Mexican border and seeking asylum in recent months.

American officials detained 144,000 migrants at the border in May, up 32 percent from April and 278 percent from May 2018. The total included a record 89,000 families.

Trump wants Mexico to do more to reduce that number.

Last month, he threatened to impose tariffs on all Mexican goods, extracting a promise from Lopez Obrador's government to reinforce Mexico's southern border and expand its policy of taking back migrants while the US processes their asylum claims.

The deal, struck on June 7, gives Mexico 45 days to show results.

Mexican National Guard soldiers detain Central American migrants trying to cross the Rio Grande into the United States at Ciudad Juarez

Critics say that Mexican soldiers stopping migrants trying to cross into the United States is a violation of human rights