Venezuelan migrants sleep on makeshift beds in the streets of Maicao, Colombia, in February.Jaime Saldarriaga / AP

MAICAO, Colombia—Neat rows of family-size tents from the United Nations refugee agency, 60 in all, flap in the wind on a patch of empty desert near Colombia’s border with Venezuela. Nearby, a construction crew flattens the parched earth for space to set up three times as many.

This is precisely what Colombia had insisted would never happen.

As Venezuela’s economic and political crisis has deepened—President Nicolás Maduro’s leadership is rejected by an array of countries, yet he has refused to vacate his post; the army has declined to abandon him; and hyperinflation has made day-to-day life unbearable for the vast majority of people there—the tide of Venezuelan migrants crossing into Colombia has steadily risen. Throughout, officials here have pressed for a long-view response to the crisis, investing in measures to integrate the new arrivals into the Colombian economy rather than spending on soup kitchens and temporary shelters. They had hoped to head off more complex problems of youth crime and immigrant ghettos.

But as the first rows of UN tents have gone up in the area near the border, and with the situation in Venezuela showing no signs of resolving itself, Colombia’s effort, lauded by experts and aid workers, looks instead like a race against the clock, with time ticking away until refugee camps become the only option to house new arrivals. In effect, this country is fighting to keep ahead of Venezuela’s cascading collapse.

Maicao, which lies along Colombia’s frontier with Venezuela, used to have a reputation as a shopping city, offering all manner of goods to eager day-trippers from across the border in Maracaibo, a city of 1.7 million people that is a short drive away and is the seat of Venezuela’s oil sector. Like other Colombian cities, it once thrived off Venezuelans, who not long ago were the continent’s richest people. On weekends, the streets here thronged with Venezuelan families who’d driven over in air-conditioned SUVs.

Today, those visitors have been replaced by destitute migrants, and the streets of Maicao are packed with stalls selling more basic items, from medicine and hygiene products to food and household supplies. Smaller-scale sellers—both locals and Venezuelans—walk the sidewalks, desperately trying to hawk plastic buckets, washcloths, or even recently killed rabbits. On almost every street corner, a handful of people offer packaged snacks and two-ounce cups of sweet coffee. The poorest walk around offering individual candies from a bag, or cigarettes from a box, while those without money to spare for inventory simply beg for change or food. The situation is similar along the thousand-mile border between the two countries, but the scenes in Maicao may be the most dramatic.

Conditions here grew so bad that in January, local and national leaders were finally forced to take the step they’d long hoped to avoid: They asked the United Nations High Commissioner for Refugees to set up tents on about 10 acres of barren desert on the outskirts of town. In March, the UN agency opened what it called a “center for temporary attention,” a $1.7 million facility with 60 family-size tents and room for 350 people to stay for six weeks at a go, during which time they have to try to find a job, save up some rent money, or find somewhere else to sleep. “Centers like this,” Jozef Merkx, the UNHCR head for Colombia, told me, “should be a last resort.”

But few jobs are available here, and many Venezuelans will likely return to the streets when their time expires. Even in a best-case scenario, a humanitarian response involving camps and kitchens may get a few hundred people off the streets and stem hunger, but leaves unanswered the looming, long-term question of how these areas will integrate all these new residents. Maicao, for example, has, in the past six months alone, seen the equivalent of a decade of population growth in the form of migration from Venezuela, Aldemiro Choles, its city secretary, told me. Since last summer, the number of Venezuelans in this city has quadrupled, to an estimated 60,000. Many are unlikely to ever move back home.

Colombia had sought to head off this exact issue, by allowing Venezuelans to come and go freely within a designated border area, and gave more than half a million of them the right to work; all foreign children were also allowed to register at Colombian primary schools. This month, it has gone further, announcing $240 million in funds to bolster the border zone’s economy: Bogotá is offering a special tax break in areas near the border, along with cheap credit to encourage businesses to hire. Local hospitals are also getting more money, and plans to build or improve roadways, aqueducts, and parks have been approved. The government is even funding a community orchestra.

“The worst that can happen is that the migrants come to a zone full of cities of poverty and unemployment,” Felipe Muñoz, Colombia’s presidentially appointed border manager and the man charged with rolling out the plan, told me. “This will give the area an economic injection.”

It’s an ambitious attempt to deal with a major crisis. Dany Bahar, a Venezuelan-born economist with the Brookings Institution, a think tank in Washington, D.C., told me that a mass migration can depress wages because it warps the ratio of available workers to the available money to pay them. By introducing free credit and government spending, “they’re bringing that ratio back to where it was. It’s really smart,” he said.

If executed well, the plan could seize the economic opportunity presented by a mass migration and leave the economy of the long-suffering border region better off as a result. But Colombia is racing to ensure that the ever-growing stream of arrivals doesn’t leave it with no choice but to set up tents and begin to house a desperate and displaced population. Indefinite camps would be a drain on resources and a tremendous commitment with no definite end date. Bahar has warned that the scale of the Venezuelan migration could surpass that of the exodus from Syria. With conditions only worsening in Venezuela and thousands already fleeing each day, little suggests he may be wrong.

The pressure is ramping up: Across the border in Maracaibo, conditions have only continued to worsen. The Wall Street Journal called Maracaibo Venezuela’s “symbol of urban dystopia” and “the face of the nation’s meltdown” in a report last week, which detailed the daily struggle just for food and drinking water.

Venezuelans staying at the camp outside Maicao, such as 38-year-old Liset Dinares, espouse little hope for their country. Dinares left Maracaibo in December with her 13-year-old son, but since they came here, things at home have only worsened, notably with a series of major power outages last month, and she has lost contact with her siblings and cousins who still live in Maracaibo.

“I imagine they are eating,” she told me, thinking of her family. “But as soon as there’s nothing left to eat, I’m sure they will come here.”

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.