Many in the caravan said they decided to migrate after a decision by the Mexican government to drastically speed up the process for securing a yearlong humanitarian visa that allows migrants to legally travel and work in Mexico.

“The humanitarian visa that they’re giving now is the reason we are here,” said Carlos del Valle, a Guatemalan teacher who was standing in line with his family this week to apply for the visa on the bridge connecting Guatemala with Mexico.

“Later, if possible, we can get to the United States,” he said.

Under the streamlined process, which began last week, the government is seeking to issue the humanitarian visa in an average of five days rather than a month. Migration officials said the policy would be permanent.

The initiative, officials say, is part of the president’s strategy to make Mexico’s immigration policy more humane, after years of stepped-up deportations under pressure from the United States. But it could also draw even more migrants to trek north to the border with the United States, inflaming tensions with a Trump administration determined to build a border wall and lower immigration numbers.