For years, the world watched corrupt socialists turn Latin America’s richest nation, Venezuela, into one of its poorest. Now, as the country’s economy nears total collapse, it’s time to ask what can be done to contain the fallout and help its residents.

Start with its refugees: In a nation whose 2016 population was 31 million, 1.8 million have fled the country over the past two years. This year, it’s 5,000 a day — with the United Nations projecting another 2 million gone by year’s end.

Venezuela’s neighbors bear the brunt of this refugee flood. But more than 28,000 Venezuelans sought asylum in the United States last year, the US Citizenship and Immigration Services notes. That’s up 88 percent from 2016, and 1,300 percent since 2014. There are now three times as many asylum-seekers here from Venezuela as from any other nation.

Refugees come from all classes: Lawyers, professors, ex-government officials and others are now employed in nearby countries as day laborers (maids, restaurant workers, etc.) and even sex workers, The Washington Post reports.

Several nearby nations don’t offer asylum, so refugees remain illegal immigrants, at the mercy of resentful natives. Human trafficking and sexual exploitation have grown.

It’s hardly better back home: With the economy in free fall, poverty now grips nine out of every 10 Venezuelans who remain.

Last week, hyper-inflation — pegged at 1 million percent a year, the world’s worst — prompted President Nicolás Maduro to devalue Venezuela’s currency 90 percent. He also ordered a 3,000 percent hike in the minimum wage and higher taxes. Analysts think he’s only hastening the end.

Meanwhile, stores are empty or closed. Severe shortages of food and medicine have brought starvation and death from easily curable diseases. In Friday’s Post, Benny Avni described the ripple effects in other Latin American nations: The growing economic and humanitarian crisis has turned regional.

Until Hugo Chávez took power in 1999, Venezuela enjoyed ample prosperity, thanks to its world-leading oil reserves. But his populist socialism began a downward spiral that was accelerating even before Maduro took over.

Socialism isn’t the only culprit, of course: Corruption, a world oil-price plunge, government incompetence and the Chávez-Maduro war on independent institutions all contributed.

But with the destruction now in full view, the blame game must take a back seat to the world’s new challenge: figuring out how to contain this disaster and save as many desperate Venezuelans as possible.