A former Honduran lawmaker traveling with a caravan of migrants heading toward the U.S.-Mexico border was detained by authorities in Guatemala on Tuesday as President Trump threatened to arrest anyone entering the country illegally.

Ex-legislator Bartolo Fuentes, who is said to have organized the march, was detained by Guatemalan authorities after failing to register with migration officials upon entering the country. Wilmer Simon Gomez and Michael Fajardo were among two others detained from the migrant group.

An official with the country’s migration agency said that Fuentes was to be taken to a migrant shelter and then deported.

News of the caravan, which is said to comprise some 2,000 migrants, prompted Trump to double down on threats to cut off aid to Honduras if the mass migration continues.

“We have today informed the countries of Honduras, Guatemala and El Salvador that if they allow their citizens, or others, to journey through their borders and up to the United States, with the intention of entering our country illegally, all payments made to them will STOP (END)!” the president said in a tweet late Tuesday.

Trump added that anyone entering the country “illegally will be arrested and detained” before being deported.

The government of Honduras has called the group of travelers an “irregular mobilization” that is "obviously political and seeks to upset governability, stability and peace in Honduras and the United States."

It has urged the immigrants to stop.

The caravan, which departed from San Pedro Sula in Honduras, is the second such grouping this year to spur warnings to Latin American leaders by Trump. In April, he threatened to withdraw aid from countries -- including Honduras -- that allowed a previous caravan of migrants through.