Hundreds of thousands of Venezuelans are fleeing their country’s misery and pouring across borders into nearby countries, particularly Colombia, creating a sharpening challenge for the region.

As the collapse of Venezuela’s economy deepens, the number of those fleeing is accelerating. Nearly 3 million Venezuelans—a 10th of the population—have left the oil-rich country over the past two decades of leftist rule. Almost half that number—some 1.2 million people—have gone in the past two years, according to Tomás Páez, a Venezuelan immigration expert at Venezuela’s Central University.

Some 550,000 Venezuelans were in Colombia at the end of 2017, a 62% increase from a year before, according to the Colombian government, with another 50,000 entering so far this year.

Those numbers mirror the 600,000 Syrian asylum seekers in Germany, and the 700,000 Rohingya who fled to Bangladesh from Myanmar in last year’s brutal crackdown.

A Venezuelan migrant cleans windshields in Cúcuta, Colombia, the kind of informal job that Venezuelans can take to make a living. Below, Venezuelans carry their belongings as they cross the main bridge connecting San Antonio, in Venezuela, to the Colombian city of Cúcuta.

“By world standards Colombia is receiving migrants at a pace that now rivals what we saw in the Balkans, in Greece, in Italy in 2015, at the peak of [Europe’s] migrant emergency,” said Joel Millman, a spokesman for the United Nations’ migration agency.

Colombian President Juan Manuel Santos last week announced his government would stop issuing border-crossing cards that had been granted to 1.5 million Venezuelans to come and go on short trips. He ordered 2,000 soldiers be deployed to control illegal, dirt-path entries into Colombia.

Growing DiasporaVenezuelan migrants residing in selected South American countries, by yearSources: Government of Colombia (Colombia 2017); International Organization for Migration (all others)*2016 for Chile
2017*2015ColombiaArgentinaEcuadorChile*BrazilPeruUruguay0100,000200,000300,000400,000500,000600,000

The president said Colombians “should also be generous to Venezuelans,” noting that when Venezuela was prosperous in the late 20th century, it opened its doors to more than a million Colombians.

The migration is taxing Colombian border localities and raising the specter that Venezuela’s social upheaval will spread here. Colombia has long had troubles of its own, including integrating former Communist guerrillas from a civil conflict that only ended recently.

Here in Cúcuta, the largest Colombian city on the border, Venezuelan familieshave turned parks into makeshift shelters and strung up hammocks outside retail shops. During the day, they join Cúcuta’s informal economy, selling soft drinks and cleaning windshields on the streets.

A large Venezuelan family, above, found lodging in a hotel room in Cúcuta, Colombia, paid for by the Colombian government. Below, Venezuelans with no money or place to go have taken to sleeping in parks, soccer fields and basketball courts in the border city.

“Just look at this. These people wouldn’t need to be here if things were fine in Venezuela,” said Father José David Cañas, watching over nearly 1,000 Venezuelan women and children as they lined up for lunch at the soup kitchen he runs. “We’re just helping 1% of the people who are coming into Colombia. It’s a humanitarian crisis.”

Kelly Alazares, 43, has had to put her four children to work selling food in the streets while she works in a restaurant. “Thank God, we have enough to eat,” she said.

Others wonder if they made the right move. “I thought it would be easier,” said Jesús Galicia, 35, who hawks cigarettes and bottled water. “Some people got me excited about coming here. But then you come, and you crash.”

Everything moves slowly under the hot sun at Venezuela’s border to Cúcuta, Colombia, the gateway for most Venezuelans leaving their country. Despite posted soldiers, some Venezuelans smuggle all manner of products into Colombia for sale, authorities say, including tires.

By the end of this year, Venezuela’s economy will be half the size it was in 2013, according to the International Monetary Fund. Inflation is expected to hit 13,000% this year.

A poll conducted by the Caracas firm Consultores21 across Venezuela in December found that 40% of respondents want to flee. The country of preference is the closest, Colombia, but the recent surge is evident across South America. The number of Venezuelans leaving Colombia via a single southern border crossing into Ecuador soared from 32,000 in 2016 to 231,000 last year, underscoring how many have been using Colombia simply as a layover.

The first thing some Venezuelans do upon arriving in Colombia is head for the supermarket, as this family did. Shelves are empty in their homeland.

There are now substantial Venezuelan communities in Argentina, Ecuador, Chile and Brazil, where tens of thousands have entered via remote jungle crossings and settled in the city of Boa Vista, population 313,000, in the Amazonian state of Roraima.

Last week, the influx prompted the government of Brazil’s President Michel Temer to deploy more troops on the border while saying it would start relocating Venezuelans to other cities in Brazil’s interior. “There is a permanent concern about Venezuelan refugees who come to Brazil,” Mr. Temer said.

Alejandra Contreras, 22, left two children in Venezuela and fled to Colombia, where she hoped to work to buy food for her family. “I had reached the limit in Venezuela,” she said, tearing up. Mario Acosta built his own home in a shantytown on Cúcuta’s outskirts, where life is hard but better than in Venezuela. “I was starving,” he says.

Many of the newcomers to Colombia have stories similar to that of Sandra Graterol, who watched revenues from the small metal shop she and her husband ran in central Venezuela get swept away by the crisis.

“There’s nothing there, and everyone was coming here,” said Ms. Graterol, 30. “I said, ‘I’m going to go, too.’” She now earns $10 daily selling trinket on the streets of Cúcuta, enough to feed the five children back home.

The influx prompted Colombian officials to travel to Turkey last year to study how authorities were dealing with Syrian war refugees. The government has permitted Venezuelans to access public health care and, for those with passports, to enroll children in schools.