Central American migrants moving in a caravan through Oaxaca, Mexico are pictured atop a train known as "The Beast" as they continue their journey toward the United States, April 26, 2019. REUTERS

Mexico City -- About 100 Mexican soldiers and immigration agents raided a freight train in the southern state of Chiapas on Thursday and detained dozens of Central American migrants riding atop the cars. Such raids had been rare since the last crackdown on migrants in 2014. But under increasing U.S. pressure to reduce the flow of hundreds of thousands of Central Americans through Mexican territory, Mexico's government has stepped up enforcement.

At least some of the troops wore armbands of Mexico's newly formed National Guard. The government says it has deployed thousands of Guard agents across the country with supporting immigration enforcement.#

In a scene filmed by Associated Press journalists, the train rolled to a stop in a rural area, and then soldiers climbed ladders to the top of freight cars shouting, "This is the army, you're surrounded!"

Get Breaking News Delivered to Your Inbox Click here to view related media. click to expand

Throngs of migrants sought to flee by running along the tops of freight cars, while others clambered down to the ground and headed into the brush.

One soldier was seen wrestling a young, flailing man into a waiting immigration van by the neck. Agents filled three such vehicles with migrants, but hundreds more were apparently able to escape.

The train may have been carrying as many as 400 migrants, and Mexico's Immigration Institute said it detained 40.

The most recent such raid occurred May 1 in the state of Oaxaca. Central Americans have been riding freight trains, collectively known as "La Bestia," or The Beast, for years.

Previous raids have served to temporarily discourage migrants from hopping aboard the trains, which is technically prohibited but has long been tolerated.

Trump reacts to tragic migrant photo

The raid came the same day authorities in the Gulf coast state of Veracruz detained more than 450 migrants in a series of operations, including nearly 260 who were taken into custody in raids on hotels, motels and the main bus station in the city of Veracruz.

"We have been making detentions in the entire state," said Edgar González Suárez, the Immigration Institute's delegate for Veracruz. He called the raids in the Veracruz city "perhaps the biggest operation" to take place there, and said most of the migrants were Hondurans and Guatemalans.

Meanwhile 134 migrants were discovered in a crowded tractor-trailer abandoned along a highway elsewhere in Veracruz state, according to a joint statement from several federal agencies.

Soldiers and federal police found the trailer Thursday as people were trying to break the locks from inside to get out, it said. Some were found to be in a state of dehydration and had minor injuries.

The Immigration Institute determined that 71 of the migrants were minors. It did not give information about nationalities.

A photo released by the government showed the container with its back doors open and clothing, food and bundles strewn inside and on the ground.

Mexico has said a lynchpin of its immigration enforcement efforts is to crack down on human smuggling networks.

Earlier this month authorities intercepted four trucks packed with nearly 800 migrants, an uncommonly large number for a single operation although such discoveries are relatively routine.