Venezuelan migrants walk Monday toward the Rumichaca International Bridge in Ipiales, Colombia, on the border with Ecuador. (Luis Robayo/AFP/Getty Images)

Denny Gudiña spent seven days riding 25 different freight trucks to cross Colombia. He walked through the rain, slept by the highway and rode in an uncovered cargo bed through the frigid Andean highlands at night.

He ate nothing but the crackers he carried and the food donations from generous Colombians who knew about the rampant hunger and misery he fled in his native Venezuela.

On Sunday he arrived on foot at the Ecuadoran border, only to find it closed to Venezuelans without passports and crowded with hundreds of other migrants who had found their trips suddenly blocked.

More than 2 million Venezuelans have fled their country since 2014, according to U.N. figures, as an economic crisis intensifies in the oil-rich nation. Many have streamed through neighboring Colombia to countries such as Ecuador and Peru. But some South American countries say they are increasingly unable to cope with the crush of migrants. Ecuador last weekend imposed new rules blocking entry to Venezuelan migrants who have no passports or only a few months left on their documents.

“How demoralizing,” Gudiña said. “So much time traveling here to arrive, and they tell us no.”

Peru last week also announced it would soon require arriving Venezuelans to have passports, rather than just national ID cards. Meanwhile, Brazil deployed more military forces to its northern border after citizens there burned a Venezuelan migrant encampment on Saturday.

“The capacity of the region is overwhelmed,” said Yukiko Iriyama, a representative for the U.N. refu­gee agency in Colombia. “The magnitude of the situation really requires a regional comprehensive approach.”

At the Rumichaca international bridge, one of several connecting Colombia and Ecuador, more than 4,000 Venezuelans were crossing daily by late July, according to Colombia’s migration authority, a steep increase over previous months.

Last week, Ecuador declared a “state of emergency” due to the volume of migration and imposed the new passport rule. Venezuelans often lack such documents, because they can face months of delays and have to pay hundreds of dollars to get passports from their increasingly dysfunctional government.

“Everything has its limit,” Ecuadoran President Lenín Moreno told local media on Saturday.

Ecuador’s public defender challenged the decision, with a court ruling pending, and special exceptions were made for children. But crowds accumulated at the border crossing Sunday and Monday as Venezuelans continued to arrive by bus or on foot.

One family said they had sold their TVs, washing machines, a computer and a motorbike, then borrowed money from relatives outside Venezuela to buy bus passage from the Venezuelan border to Lima, Peru, for $215 per person.

“Imagine people like us who have sold everything, down to our beds, to come here, and they close the door on us,” said Jonnayker Lien, 18, standing beside his parents, brother and aunt. “We don’t know where to sleep, and we don’t have money to go back.”

The family, like hundreds of others, huddled in blankets overnight on the concrete sidewalk as the temperature in the mountain border town dipped below 50 degrees.

Even before the new passport rule was announced, the Ecuadoran government and international organizations had installed field medical facilities, portable bathrooms and tent shelters at the border crossing.

But the facilities were overwhelmed by the flood of people who were starting to back up at the blocked border. Some Venezuelans were suffering from hypothermia and many lacked adequate food, said Gustavo Salazar, a coordinator with the Red Cross of Ecuador.

With the passport rule tied up in court, he said, many Venezuelans would probably remain at the border for the foreseeable future.

Some migrants wouldn’t accept that fate. Two cousins, Jose and Kenny Ramo, 25 and 30, sat atop their tattered backpacks and wondered what to do. Like others, they had walked and hitched rides across Colombia, leaving behind children and wives. They could not go back, they said.

After hours of waiting, the cousins shouldered their packs and slipped off into the Ecuadoran forest, bound for Peru.

Police appeared to make no attempt to stop those who sought to enter Ecuador on foot without passports. But transportation companies ask foreigners for a passport with an official entry stamp before issuing a ticket, so those without proper documents could face a daunting hike of hundreds of miles through high mountains before reaching a city.

Late Sunday, about 100 of the Venezuelan migrants left the border post and started walking up a highway into Ecuador, suitcases in tow.

“We’ll continue on foot, go on to a better life,” said Gender Valindo, 25, a former heating systems tech, as he marched up the steep road.