Mexican military deployed throughout the country as part of President Andrés Manuel López Obrador's vow to do more to apprehend migrants headed to the United States, have officially begun targeting foreigners who have hitched rides aboard a freight train known as "The Beast" to get to the U.S.-Mexico border, local media reported Sunday.

Mexican National Guard held up the "La Bestia" train in an unpopulated area near Tuxtla Gutiérrez, Chiapas, a city north of the Mexico-Guatemala border, where migrants have been crossing into the country.

The operation marked the first of its kind since López Obrador and President Trump reached a deal late Friday, in which the U.S. would hold off on tariffs against Mexican imports if the government did more to prevent people from traveling through the country.

"The National Guard was placed on one side, moment that was taken advantage of by more than 200 migrants who got off the train and fled," Nataniel Hernández Núñe, director of the Digna Ochoa Human Rights Center, told El Universal.

Many "hid in the bush, so only 25 were arrested," Hernández said.

The train was headed to Oaxaca, a state located northwest of Chiapas. From there, the train riders would have hopped onto another freight train.

A map of freight train routes migrants have used for more than a decade to travel through Mexico, according to a 2008 report titled "The challenges of migration in Mexico. A two-sided mirror." Economic Commission for Latin America and the Caribbean

Mexico's Institute for National Migration has previously said migrants who illegally entered the country and do not have temporary visas allowing them to travel through will be deported because they are in the country without legal permission.

Migrants have used freight trains at a lower rate in recent years compared to how popular it was around 2014 and 2015, when unaccompanied children and families began climbing aboard the trains to avoid paying smugglers to get them to the U.S.-Mexico border.

Mexican authorities in 2014 declared it illegal to ride on the trains when the practice became widespread. Until this weekend, the move has gone largely unenforced.

The trains leave out of Mexico's southern state of Chiapas then go up to Mexico City, located in the center of the country. From there, the trains go in a number of directions, giving migrants options as to which part of the U.S. border they would like to go. The journey typically takes two weeks.

Riding on top of the 12-foot-tall freight cars is dangerous. Injuries and deaths have been well-documented over the past decade, including last month, when a Honduran man trying to jump on board while the train was moving fell off and had his foot run over by a wheel.