The last major bastion of Venezuelan democracy looked set to fall into the hands of Nicolás Maduro’s authoritarian government on Sunday as the country held elections for a new National Assembly.

The assembly, Venezuela’s congress, has been headed by opposition leader Juan Guaidó for the past two years.

The result of the vote is not in doubt: Mr Maduro has tilted the playing field so far in his favour that his ruling socialist party (PSUV) is sure to emerge as the dominant force in the expanded 277-seat parliament, particularly as the main opposition parties are boycotting the vote.

But fallout from the election could reshape Venezuelan politics in the months ahead: Mr Guaidó is among those abstaining, meaning he will lose the presidency of congress, the basis for his claim to be the legitimate interim president of Venezuela. Once the new parliament is installed on January 5, his position will look increasingly tenuous.

The US, the British and some Latin American nations say they will still recognise him as the country’s rightful leader, arguing that Mr Maduro stole power via bogus elections in 2018. In their eyes, the Guaidó-led congress will remain the country’s legitimate legislative body even after January 5 until new, fair elections can be held.

However, the EU’s position may be more nuanced. Some European nations feel uneasy about the contorted sophistry required to justify support for Mr Guaidó. The change of leadership in the White House on January 20 muddies the waters further. Incoming US president Joe Biden has to decide whether to stick by Mr Guaidó, who has conspicuously failed in his campaign to topple Mr Maduro, or chart a new course for Washington’s Venezuela policy.

Meanwhile, the Maduro government has threatened to persecute members of the opposition once it takes over the National Assembly. The regime is likely to harry Mr Guaidó himself, although he insists he will stay in Caracas and will not be forced into exile.

“The regime’s threats are neither new nor empty,” the 37-year-old opposition leader told a news conference in Caracas on Saturday. “But we can’t allow a dictatorship to normalise itself in Venezuela in the 21st century.”

The main opposition parties regard Sunday’s vote as a sham and have urged their supporters to stay at home. Turnout is likely to be low and those who do cast a ballot will generally back the socialists.

“It's a historic moment. Finally we're going to take back the assembly that is rightfully ours,” said Luis Aguilera, a 72-year-old retired construction worker, on Sunday after voting at the Liceo Andrés Bello, a school being used as a voting centre in downtown Caracas.

“They've tried everything to get rid of Maduro. They've tried to assassinate him with bombs, they've used the economic blockade against him, and he's still here, because he has the people's backing.”

Marely Hernández, a student, after voting at the same place, said it did not matter who won control of the assembly.

“What matters is the quality of the people who are elected. We need good, smart people because Venezuela is facing an awful lot of problems — everything from inflation to food scarcity and lack of gas. We have to start finding solutions.”

The socialists have been in buoyant mood in the run-up to the election. Mr Maduro breezily offered to resign if the opposition won — a measure of how confident he feels. On Saturday night he hosted a lengthy television show broadcast on at least four national channels and clearly relished the vote.

At an end-of campaign rally in Caracas this week, the Financial Times saw thousands of young socialists gather in a cavernous gymnasium to hear their candidates berate the opposition and their US backers while trotting out the well-worn slogans of the Bolivarian socialist revolution.

“Not only are we going to take back the National Assembly, we’re going to stay in power for another 20 years,” said one young activist, Yurelys, shouting to make her voice heard above the blare of reggaeton music and firecrackers.

In sharp contrast to the socialists’ upbeat mood, the Venezuelan opposition is in disarray. Some smaller opposition parties are competing in the elections while others, including those in Mr Guaidó’s bloc, are not. Some are staging a makeshift national referendum next week on Mr Maduro’s rule. Others say that is a waste of time. Hardliners argue there is no point in trying to negotiate with Mr Maduro while moderates say talks are the only way to resolve Venezuela’s protracted political crisis.

“I have never seen the opposition as fractured as is it at the moment,” says Luis Vicente León, the director of Datanálisis, the most reliable pollster in the country. “Never!”

Mr León’s polling shows that Mr Guaidó remains the most popular politician in the country but only just. His approval rating has slumped from more than 60 per cent when he emerged in January 2019 to 30 per cent now, not far above other opposition figures. Mr Maduro’s approval rating is flatlining at about 14 per cent.

Asked what their main concerns were ahead of the vote, residents of La Pastora shied away from ideology and focused on their more immediate needs.

“We need gas, electricity, running water, petrol and food,” one woman said. “Whoever gives us those five things gets my vote.”