The group of migrants set off from Tapachula, Mexico, on March 25, and moved north, more or less en masse, by foot, hitchhiking, on buses and by stowing away on trains.

Such mass migrations have become an annual rite, usually around Easter week, with the size of the group providing protection against the criminals who lurk along the path and helping to draw public attention to their plight.

This year’s group, which numbered upward of 1,200 in the journey’s early stages, was perhaps the largest on record. Still, like all the caravans that have come before, this one might easily have gone unnoticed had it not ended up on “Fox & Friends,” a favorite television show of President Trump.

The president posted a series of messages on Twitter that warned of dangers from the group. Mr. Trump used the caravan as a cudgel against the Mexican government, accusing it of doing little to curb illegal northward migration, and as grounds to deploy the National Guard to the southwest border of the United States.

With the caravan nearing the Mexico-United States border this week, Mr. Trump returned to the subject, saying on Twitter on Monday that he had instructed the Department of Homeland Security “not to let these large Caravans of people into our Country.”