I F PROTESTS ALONE could oust a president, Nicolás Maduro would already be on a plane to Cuba. On January 23rd at least 1m Venezuelans from across the country took to the streets demanding Mr Maduro step down. They were answering the call of Juan Guaidó, who last week proclaimed himself the rightful head of state. Mr Guaidó has won the backing of most of Latin America, as well as the United States and Europe. Protests planned for February 2nd promise to be even bigger. But Mr Maduro is supported by the army as well as Russia, China and Turkey. As The Economist went to press, he was still holding on to power.

Much is at stake. Most important is the fate of 32m Venezuelans made wretched by six years under Mr Maduro. Polls suggest that 80% of them are sick of him. Other countries are also hurt by Venezuela’s failure. The region is struggling with the exodus of over 3m of its people fleeing hunger, repression and the socialist dystopia created by the late Hugo Chávez. Europe and the United States suffer from Venezuela’s pervasive corruption, which enhances its role as a conduit for narcotics. And as world leaders pile in for Mr Maduro or against him, they are battling over an important idea which has lately fallen out of favour: that when a leader pillages his state, oppresses his people and subverts the rule of law, it is everybody’s business.

The scale of the disaster Mr Maduro has brought down upon Venezuela is hard to comprehend. In the past five years GDP has fallen by half. Annual inflation is reckoned to be 1.7m per cent (the government no longer publishes the numbers), which means that bolívar savings worth $10,000 at the start of the year dwindle to 59 cents by the end. Venezuela has vast reserves of oil and gas, but the state oil company has been plundered and put under one of the country’s 2,000 generals, who has watched production tumble to 1.1m barrels a day. People are malnourished and lack simple medicines, including antibiotics. Hospitals have become death traps for want of power and equipment. Blaming his troubles on foreign conspiracies, Mr Maduro has rejected most offers of humanitarian aid.

Despite this litany of suffering many outsiders, especially on the left, argue that the world should leave Venezuelans to sort out their differences. Some adopt Mr Maduro’s view that Mr Guaidó’s claim to the presidency, recognised immediately by the United States, is really a coup. Russia, which has worked hard to discredit the idea that Western intervention can ever be benign or constructive, is reported to have sent 400 troops from a private military contractor, also spotted in Syria, Ukraine and parts of Africa, to protect either the regime or Russian assets.

Abandoning Venezuela to the malevolent rule of Mr Maduro would be wrong. If anyone has launched a coup it is he. He was inaugurated on January 10th for a second term having stolen last year’s election. In his first term, won in 2013 in another dubious vote, he eroded democracy by silencing critical media and eviscerating the constitution. He packed the electoral commission and the supreme court with puppets and neutered the national assembly, which the opposition controls. By contrast, Mr Guaidó has a good claim to legitimacy. As head of the national assembly, he serves as acting president if the office is vacant—which, because Mr Maduro is not a legitimate occupant, it is.

The question is not whether the world should help Mr Guaidó, but how (see article). This week the United States, still Venezuela’s main trading partner, imposed what amounts to sanctions on oil exports and on imports of the diluents needed to market its heavy oil. By ordering that payments for Venezuelan oil must be put in bank accounts reserved for Mr Guaidó’s government, the United States aims to asphyxiate the regime, in the hope that the armed forces will switch to Mr Guaidó.

One danger is that Mr Maduro digs in and orders the security forces and the colectivos, organised thugs at the regime’s service, to impose terror. Another is that the United States overplays its hand. Just now it is working with the Lima group of regional governments. But its sanctions could hurt the people more than the regime. If, bent on regime change, it acts unthinkingly, it could come to be seen once again in Latin America as imperialist and overbearing. Russia is portraying the United States’s intervention as an attempt to dominate its backyard. Its media are already saying that Vladimir Putin’s interest in Ukraine is no different. The situation is a test of President Donald Trump and his foreign-policy team, including the hawkish national security adviser, John Bolton. This week Mr Bolton hinted at the use of American troops. Barring state violence against American citizens, that would be a mistake.

Mr Guaidó’s backers have ways to help without resorting to force or dirty tricks. These fall into two categories. The first includes incentives for Venezuelans to demand change, for the army to abandon the regime and for Mr Maduro to go. Now that Mr Guaidó has been recognised as interim president, he stands to control billions of dollars of Venezuela’s foreign assets if power shifts. The national assembly has passed a law offering an amnesty to soldiers and civilians who work to re-institute democracy. Mr Maduro is being promised the chance to flee the country.

The second way to help is to let Venezuelans know that the world is ready if Mr Guaidó takes power. The lesson from the Arab spring is that even a leader who starts by sweeping away a tyrant must bring improvements rapidly or risk losing support. The immediate priorities will be food and health care. The very fact of a new government will help stop hyperinflation (see article), but Venezuela will also need real money from abroad—international lenders, including the IMF , should be generous. The to-do list is long: Venezuela will need to remove price controls and other distortions and build a social safety-net. It must restart the oil industry, which will entail welcoming foreign investment. Its debt will need restructuring—including the debt to Russia and China which is due to be paid in oil. And amid all this, Mr Guaidó’s caretaker government must hold elections.

A generation ago, Venezuela was a functioning state. It can be again. It is blessed with oil and fertile land. It has an educated population at home and in the diaspora that fled. And in Mr Guaidó it has a leader who, at last, seems to be able to unite the fractious opposition. But first it must get rid of Mr Maduro.