Hundreds of migrants boarded a train known as the “The Beast” in southern Mexico on Thursday, in a risky move aimed at transporting them to the U.S. border quicker.

The decision to board the train en masse comes after a breakout of migrants from a troubled immigration detention center in the southern border city of Tapachula on Thursday night.

Mexico’s National Immigration Institute said the mass escape, which appears to be the largest in recent memory, involved around 1,300 Cuban migrants. Around 700 of them have since returned voluntarily, but hundreds remain on the run.

MORE THAN 1,000 CUBAN MIGRANTS BREAK OUT OF MEXICAN IMMIGRATION FACILITY

Migration authorities said nearly 400 migrants boarded the train, Reuters reported, with images showing men, women and children of various nationalities, most of them on the roofs of carriages.

“We hope our God above will keep helping us. We had to keep moving forward,” Michael Hernandez, a Honduran, told Reuters after disembarking from the train together with a large group of others migrants after reaching the town of Ixtepec. “They won’t let us walk, so we climbed on the train. It’s our only option.”

“They won’t let us walk, so we climbed on the train. It’s our only option.” — Honduran migrant Michael Hernandez

President Trump has been pressuring Mexico to do more about the migrants passing through their country into the U.S. – even threatening to close down the border if President Andres Manuel Lopez Obrador doesn’t stop illegal migrants from coming to the U.S. border.

Mexico has largely been responsive to the pressure, stepping up the efforts to detain the migrants and deport them back home.

BORDER PATROL UNION CHIEF BLASTS CONGRESS OVER MIGRANT CARAVANS: ‘WHAT ARE YOU DOING ABOUT IT’?

But such crackdown also led to migrants using the train, which runs from the southern border state of Chiapas into neighboring Oaxaca and north into Gulf coast state Veracruz, as this way dozens of police and immigration checkpoints along the Mexican highways can be avoided even the journey on a train is significantly more dangerous.

The train has been used by migrants in the past, but it became ignored in recent years because of the dangers of the journey, including death or lost limbs.

CLICK HERE TO GET THE FOX NEWS APP

“They're riding the train again, that's a fact," said the Rev. Alejandro Solalinde, a migrant rights activist, who works to provide temporary shelter for migrants.

“It's going to go back to the way it was, the (Mexican) government doesn't want them to be seen. If the migrants move quietly like a stream of little ants, they'll allow them to, but they are not going to allow them to move through Mexico publicly or massively,” he added.

Fox News’ Greg Norman and the Associated Press contributed to this report.