After blaming the Democrats for "weak laws" on immigration a few days earlier, Trump said via Twitter: "The Caravans are a disgrace to the Democrat party. Change the immigration laws NOW!"
In another tweet, he said the migrants would not be allowed into the United States.
Mexican President-elect Andres Manuel Lopez Obrador suggested Sunday that the United States, Canada, and Mexico work out a joint plan for funding development in the poor areas of Central America and southern Mexico.
"In this way we confront the phenomenon of migration, because he who leaves his town does not leave for pleasure but out of necessity," said Lopez Obrador, who takes office Dec. 1.
The migrant caravan, which started out more than a week ago with less than 200 participants, has drawn additional people along the way and it swelled to an estimated 5,000 Sunday after many migrants found ways to cross from Guatemala into southern Mexico as police blocked the official crossing point.
Later in the day, authorities in Guatemala said another group of about 1,000 migrants had entered that country from Honduras.
In interviews along the journey, migrants have said they are fleeing widespread violence, poverty and corruption in Honduras. The caravan is unlike previous mass migrations for its unprecedented large numbers and because it largely began spontaneously through word of mouth.
Migrants received help Sunday from sympathetic Mexicans who offered food, water and clothing. Hundreds of locals driving pickups, vans and cargo trucks stopped to let them clamber aboard.
Civil defense officials for Mexico's southern state of Chiapas said they had offered to take the migrants by bus to a shelter set up by immigration officials about 5 miles (7 kilometers) outside Tapachula, but the migrants refused, fearing that once they boarded the buses they would be deported.
Ulises Garcia, a Red Cross official, said some migrants with injuries from their hard trek refused to be taken to clinics or hospitals, because they didn't want to leave the caravan.
"We have had people who have ankle or shoulder injuries, from falls during the trip, and even though we have offered to take them somewhere where they can get better care, they have refused, because they fear they'll be detained and deported," Garcia said. "They want to continue on their way."
Garcia said he had seen cases of swollen, lacerated and infected feet. But "they are going to continue walking, and their feet won't heel as long as they keep walking," he said.
Jesus Valdivia, of Tuxtla Chico, Mexico, was one of the many who pulled his pickup truck over to let 10 or even 20 migrants hop in at a time, sometimes causing vehicles' springs to groan under the weight.
"You have to help the next person. Today it's for them, tomorrow for us," Valdivia said, adding that he was getting a valuable gift from those he helped: "From them we learn to value what they do not have."
Passing freight trucks were quickly boarded by dozens of migrants, and straining tuk-tuks carried as many as a half-dozen.
Brenda Sanchez of San Pedro Sula, Honduras, who rode in Valdivia's truck with three nephews ages 10, 11 and 19, expressed gratitude to "God and the Mexicans who have helped us."
WATCH: Here are the businesses profiting from immigration enforcement