President Nicolás Maduro has tightened his grip on Venezuela after winning control of the legislature in elections boycotted by most of the opposition and condemned by the US as a “fraud and a sham”.

Mr Maduro’s United Socialist Party of Venezuela (PSUV) and its allies secured 67.6 per cent of the vote for the National Assembly, according to figures from the government-appointed National Electoral Council (CNE). Official numbers gave turnout as 31 per cent but the opposition said the true figure was little more than half that.

“We won with votes and we triumphed over the malign opposition,” Mr Maduro said after the results were announced. “A cycle of positive, virtuous change is coming.”

Opposition leader Juan Guaidó and his allies refused to take part in the vote, saying government repression and interference in the electoral process made a fair contest for the National Assembly impossible. The opposition will hold its own online referendum in the coming days, asking Venezuelans if they want fresh presidential elections and an end to Mr Maduro’s rule.

“You are not alone. We will not give up,” Mr Guaidó said in a video message. “We are going to give everything until we win.”

The National Assembly has been in opposition hands since the last election in 2015 and has been a constant thorn in Mr Maduro’s side. In January 2019 Mr Guaidó claimed the presidency, declaring that since Mr Maduro had returned to power in a fraudulent election, he was now the country’s rightful leader as head of parliament.

After two decades of revolutionary socialist rule, Venezuela’s once-wealthy oil economy is in ruins and its people are suffering acute shortages of water, fuel and electricity. Inflation is running at more than 6,000 per cent, the currency, the Bolívar, is virtually worthless and 5m people have fled the country.

The US, the EU and most of Latin America recognised Mr Guaidó’s interim administration but hopes that this would lead to Mr Maduro’s early departure faded as the Caracas government dug in. Ever-tighter US sanctions crippled oil exports but failed to produce regime change.

The EU refused to send observers to Sunday’s election and US secretary of state Mike Pompeo condemned the vote in advance, saying: “The results announced by the illegitimate Maduro regime will not reflect the will of the Venezuelan people. What's happening today is a fraud and a sham.”

Before the election the Maduro regime had taken over three of the biggest opposition parties, installing puppet leaders at their helm. It also appointed fresh officials to run the electoral council in defiance of congress, dominated media coverage and harassed and imprisoned critics.

A small number of opposition groups not associated with Mr Guaidó did take part in Sunday’s vote, allowing the government to claim a semblance of competition in the balloting, which took place at more than 14,000 polling stations from Caracas to the Amazon jungle to the oil-rich state of Zulia.

The voting appeared to have passed off peacefully. People were waiting patiently to vote in Catia, Petare and 23 de Enero — poor districts of Caracas where a generation ago Mr Maduro’s predecessor Hugo Chávez enjoyed massive support.

“With Chávez we had higher incomes and a better quality of life,” said 43-year-old Carmen Amundarai as she waited in line at the Manuel Palacio Fajardo school where Mr Chávez regularly cast his ballot, and where the walls are covered with murals of him and Simón Bolívar, Venezuela’s hero of the wars of independence. “Because of the economic blockade against Venezuela we’ve gradually been losing the quality of life we once had.”

In Zulia state, voting was disrupted by one of Venezuela’s regular power cuts and across the country many people appeared to regard the election as a sideshow compared with the daily struggle for food, medicine, work, petrol, gas and running water.

“Yesterday I waited eight hours in line for petrol. Today I voted in three minutes,” one man said after casting his ballot in Catia.

The new Maduro-controlled National Assembly will be sworn in on January 5, two weeks before Joe Biden is sworn in, presenting the new US president with a delicate challenge.

The US, UK and some Latin American countries plan to continue to recognise the Guaidó-led congress as the country’s legitimate legislative body, and Mr Guaidó as the interim president of Venezuela but it is unclear whether the EU and other nations will follow suit.

Former Spanish prime minister José Luis Rodríguez Zapatero, invited by Mr Maduro to observe the election, urged the EU and US to rethink their strategy in light of Donald Trump’s exit from the White House. It would be “the biggest absurdity in the history of international law” to continue insisting Mr Guaidó is Venezuela’s rightful leader, he said.