MEXICO CITY — Mexican soldiers, armed police and migration officials blocked hundreds of migrants after they crossed the border from Guatemala in a caravan into southern Mexico on Wednesday, and detained dozens of them, a witness from a migrant aid group and an official said.

The Mexican response in the border town of Metapa, which included dozens of soldiers, marked a toughening of the government's efforts to curb the flow of mainly Central American migrants, said Salva Cruz, a coordinator with Fray Matias de Cordova.

"That many sailors and military police, yes, it's new," Cruz said, by WhatsApp, from Metapa, in the southern border state of Chiapas, where the vast majority of migrants from Central America cross into Mexico. Many are asylum seekers fleeing violence and poverty in Honduras, Guatemala and El Salvador.

The operation in Chiapas coincided with a meeting of Mexican and U.S. officials at the White House on Wednesday to thrash out a deal that would avoid blanket tariffs on Mexico threatened by U.S. President Donald Trump last week.

Trump announced the tariffs in retaliation for what he called Mexico's failure to stop Central American migrants from reaching the U.S. border.

Mexico's National Migration Institute (INM) said in a statement that a group of about 300 people entered Mexico by a border bridge Wednesday morning, and another 120 people joined the group as they walked to the city of Tapachula.

The migrants later agreed to be taken by bus to a migration office to be processed, the INM said.

U.S. border officers apprehended more than 132,000 people crossing from Mexico in May, a third more than in April and the highest monthly level since 2006, reaching what U.S. officials said on Wednesday were "crisis" levels.

An INM official in Mexico City who was unauthorized to talk to the media said, on condition of anonymity, that the migrants were being asked to show their status in Mexico.

Migration officials detained 350 to 400 people, the official said, noting that federal police and agents from the National Guard were present. Mexico's government recently created a militarized police force called the National Guard made up of soldiers and federal police.

On Wednesday afternoon in Mexico City, police detained Irineo Mujica, director of the U.S.-Mexico migrant aid group Pueblo Sin Fronteras, and Cristobal Sanchez, a migrant rights activist, according to Alex Mensing, a coordinator with the group.

Pueblo Sin Fronteras has for several years guided annual caravans through Mexico, seeking to protect migrants and to advocate for their rights along a 2,000-mile trail ridden with criminals and corrupt officials who prey on lone travelers through kidnapping, extortion and other forms of assault.

Since April 2018 Trump has lashed out at the caravans of Central Americans wending their way to the United States, while blaming Mexico for failing to stop their movement to the U.S. border.

FOLLOW NBC LATINO ON FACEBOOK, TWITTER AND INSTAGRAM.