Thousands of migrants who are part of a US-bound caravan condemned as unwelcome by US President Donald Trump have begun moving into Mexico, shadowed by hundreds of police en route to the border city of Tapachula.

The migrants have defied threats by Mr Trump that he will close the US-Mexico border if the caravan advances, and warnings from the Mexican government that they risk deportation if they cannot justify seeking asylum in Mexico.

Dressed in riot gear, police arrived along a southern highway in several buses, ahead of the throngs of men, women and children marching north after they crossed the Guatemalan border.

An unidentified police officer told Reuters there were no orders to block the caravan.

"We're just making sure they pass safely and then we'll steer them," the officer said.

Police are guiding the caravan towards a migrant shelter outside the city centre of Tapachula, about 32km northwest of the border.

As a military helicopter circled overhead, migrants who said they were fleeing a toxic mix of violence, poverty and corruption in Central America wondered if police would seek to turn the caravan back.

The caravan had previously been stopped from entering the country

Most said they felt safer advancing as part of a large group.

The multitude of migrants clogged the highway leading north from the border city of Ciudad Hidalgo in the southern Mexican state of Chiapas, many breaking into song.

"If you send us back, we will return!" a large crowd shouted. "We are not criminals, we are workers!"

Mr Trump has threatened to halt aid to Honduras and Guatemala, and potentially close the US border with Mexico with the help of the military if the migrants' march is not stopped.

Mexico's government has said throughout the past week that it would register the migrants and process requests for asylum.

Those attempting to skip the process would face deportation, but the size of the caravan will test Mexico, which has sought help from the United Nations to manage the issue.

Encamped for two nights using backpacks for pillows and tents made of trash bags on a long bridge between Guatemala and Mexico, the migrant caravan began in San Pedro Sula, Honduras, last week and grew exponentially as it passed through Guatemala.

On Saturday, Mexican immigration authorities only allowed some 640 migrants through the official border crossing on a bridge spanning the Suchiate River.

The slow pace of legal processing prompted thousands to cross the river illegally by raft or swimming, according to local officials and migrant organisers.