Most of the migrants left Honduras on Tuesday and arrived on Saturday morning local time to a bridge across the Suchiate River, which forms the border between Guatemala and Mexico.
Mexican soldiers blocked the way of migrants, reminding them that they were not allowed to enter the country without a valid visa. The guarding of the border had been strengthened before the caravan, with a total of about 3,000 people, was expected to arrive.
Some of the migrants insisted on being admitted, while others returned to migration facilities on the Guatemalan side of the border.
Migrants are fleeing poverty and brutal gang violence and their goal is to travel to the United States to seek asylum. Last year, tens of thousands of people crossed the border in the hope of a new life in the United States.
Mexico has been pressured by US President Donald Trump to halt the wave of paperless migrants and Mexico has since deployed 27,000 border guards to prevent migrants from illegally crossing the country to the United States.