Ecuador has brought in new rules to stop Venezuelan migrants entering the country without a passport, leaving many stranded in neighbouring Colombia.
Thousands of Venezuelans fleeing their country’s economic and political crisis have been crossing into Ecuador from Colombia using only identity cards.
Most are heading south to join family members in Peru and Chile.
Colombia has protested against the move, saying vulnerable people will be trapped on its side of the border.
In a separate incident, residents of a Brazilian town attacked a Venezuelan migrant camp on Saturday and drove the occupants back across the border.
Venezuela has suffered for years from high inflation and the chronic shortage of food and medicines.
More than a million Venezuelan migrants have entered Colombia in the past 15 months, according to official estimates, and more than 4,000 have been arriving at Ecuador’s border every day.
Many migrants, who have been walking or hitching rides for weeks and are exhausted by the time they reach the frontier, only carry ID cards.
Early on Saturday, about 300 Venezuelans were lined up at the Rumichaca border crossing outside the Colombian city of Ipiales, and many said they had no passports to gain entry to Ecuador.
Gabriel Malavolta, a 50-year-old mechanic, left Venezuela three days ago aiming to make the overland route to Lima, Peru, through Ecuador.
He has a passport but his fiancee, Yenny, had only an ID card.
“I don’t know what we’re going to do, but we can’t go back. I’m not sending my fiancee to go back and go hungry,” he told Reuters news agency at a Red Cross tent.
“You’ve no idea what it’s like [in Venezuela]. Whole families eat from the trash.”
Christian Kruger Sarmiento, director of the Migration Colombia agency, told the BBC Ecuador’s move would only create more problems.
“Demanding a passport is not going to stop migration because this population is not leaving the country for pleasure but out of necessity,” he said.
“The first thing that will happen… is that it will see an increase in undocumented migration. That brings a lot of problems with it.”
With the flow of Venezuelan migrants causing tensions across the region, Peru’s government has announced that passport requirements for Venezuelans will begin on 25 August.
In February, Colombian President Juan Manuel Santos announced a tightening of border controls, resulting in thousands of Venezuelans rushing to crossing points.
Brazil, which neighbours Venezuela, has also expressed concerns. It temporarily closed the border earlier this month.
Violence has flared in the border state of Roraima where thousands of Venezuelans live in precarious accommodation.
By Katy Watson, BBC South America correspondent
Tensions on Brazil’s border with Venezuela have been rising steadily in recent months. When I spoke to Roraima governor Suely Campos earlier this year, she said: “We’re on the brink of a social and economic crisis,” and suggested then that a temporary closure of the border would help address the problem.
Venezuelans felt it to. I visited the very same camp that was destroyed by local residents this weekend. There, young mother Nicole told me she’d come to Brazil for a better future for her and her baby daughter, but was questioning whether what she had done was a good idea.
Nicole said she was worried about the number of Venezuelans coming over the border and she expected tensions to get worse. She was right – and with Venezuela’s economy declining every day, that’s not going to change any time soon.
In the border town of Pacaraima on Saturday, several migrant encampments were attacked by angry residents.
The attacks followed a protest in the town after a local restaurant owner was allegedly robbed and beaten up by Venezuelans.
Brazil has sent 60 soldiers to the border town after gangs of men with sticks and stones set fire to tents and other items belonging to the Venezuelans.
According to reports, hundreds of Venezuelans fled back across the border, setting fires as they left.
On the Venezuelan side of the border, meanwhile, there were reports that Brazilian cars had been attacked.
Venezuela is suffering from the highest inflation in the world, with severe shortages of basic food items and medicines.
Many people there report going hungry as they struggle to feed themselves, and have decided to leave the country in search of better economic conditions.
The country is also in the midst of a political crisis, with Venezuela’s opposition blaming the policies of the ruling Socialist Party on the struggling oil-rich economy.
Last year scores of protesters were killed in clashes during months of anti-government protests.
Despite opposition efforts to remove President Nicolás Maduro from office, he was re-elected in May’s poll. An apparent assassination attempt on Mr Maduro earlier this month has raised tensions in the country even further.