TAPACHULA, Mexico — In open defiance of the Mexican and American governments, thousands of Central American undocumented migrants, most of a caravan that has been heading toward the United States for more than a week, resumed their journey on Sunday in southern Mexico.

The Mexican government, which has been under pressure by President Trump to stop the caravan, had ordered the migrants to submit to processing by the immigration authorities at a legal border crossing.

But thousands chose instead to move on — part of a group of people who had been stopped at the Mexican border this week after having traveled for several days, most from their homes in Honduras.

Most of the migrants on the move on Sunday — by one local government estimate more than 7,000 people — had crossed the border illegally in recent days by swimming or rafting across the Suchiate River, which separates Guatemala from Mexico.