The outcome of Sunday’s legislative election in Venezuela has never been in doubt: President Nicolás Maduro and his allies have stacked the odds so far in their favour that the democratic opposition boycotted the vote for the National Assembly, the country’s last institution not under regime control.

Mr Maduro’s revolutionary socialists have not been running on their record: Venezuela’s economy has contracted by three-quarters in the past five years, inflation is running at more than 6,500 per cent and the bolivar is worthless. A country so rich in oil that it once welcomed Concorde services from Paris now suffers chronic shortages of food, fuel, electricity and running water. More than five million people have fled, creating a refugee crisis. Thousands of regime opponents have been killed or imprisoned.

Keenly aware that his government could lose a democratic election, Mr Maduro has worked overtime to tilt the playing field. The biggest opposition parties were taken over by court order and regime loyalists installed to run them. The electoral council was stuffed with government appointees. The airwaves were dominated by the ruling United Socialist Party of Venezuela, party of the late former president Hugo Chávez. Votes are being recorded on new, home-produced, touchscreen voting-machines. Russia is observing the election after the EU and US refused to send monitors.

A smattering of pliant “fake opposition” parties was intended to simulate competition. Turnout was assisted by the promise of government food parcels, with the regime’s de facto number two, Diosdado Cabello, warning that “whoever doesn’t vote, won’t eat”.

The expected new, Chavista-controlled National Assembly will nonetheless create a dilemma for the US and its European and Latin American allies. For the past two years, they have recognised opposition leader Juan Guaidó as Venezuela’s rightful interim president. That claim was based on the presumption that the 2018 election which kept Mr Maduro in power was rigged and Mr Guaidó was next in line as president of the hitherto opposition-controlled National Assembly.

Despite Mr Guaidó’s bravery and tireless advocacy, his shadow government has not succeeded in dislodging Mr Maduro. It has been tarnished by unfortunate associations with a failed plot this year by US mercenaries and an unsuccessful attempt last year to spark a military uprising.

The Trump administration staked its Venezuela policy on the idea that Mr Guaidó’s leadership and a campaign of “maximum pressure” sanctions would topple Mr Maduro. That gambit failed (though its appeal to Latino émigrés helped deliver Florida to Mr Trump in last month’s US election).

President-elect Joe Biden will now have the opportunity to help steer Venezuela towards the political freedom and economic recovery that its people crave. Trump administration officials are right that Mr Maduro should not be rewarded for yet another stolen election. But nobody seriously believes that the country’s long-running crisis can be solved without negotiations. Such talks must include not only Mr Maduro and the democratic opposition, but also Venezuela’s main backers: Cuba, China, Russia and Iran, perhaps as part of a broader Biden diplomatic effort.

The window for change in Venezuela is closing: each year the regime becomes more repressive, more refugees leave and its oil assets risk becoming stranded. Mr Biden faces an array of daunting challenges on taking office but a peaceful solution to the biggest political and humanitarian crisis in the Americas deserves to be a top priority.