Turnout was 65.45 per cent of almost 17 million eligible voters, a record for local election in recent years.

'Normal voting'

Teresa Bo, Al Jazeera's correspondent, reported that accusations of fraud had plagued the campaign but international observers said that the voting process was normal.

The polls were as a test for Chavez against an energised opposition.

Pre-election polls had shown Chavez's allies leading in a majority of races [AFP] 
His allies swept the last state elections in 2004, winning all but two of 23 governorships and a majority of local offices.

This time candidates competed for 22 governorships, 330 mayoral posts and other offices.

Chavez remains the country's most popular politician and enjoys overwhelming control of local offices.

His popularity has rebounded since he suffered his only electoral defeat in 2007 in a referendum that would have allowed him to seek re-election indefinitely.

Still, he faced an opposition buoyed by growing discontent over crime, corruption and inflation that have blighted his socialist ambitions.

Chavez has threatened to cut off national funds to states that end up in the hands of opponents.

He has said that the elections could decide "the future of the revolution, the future of socialism and also the future of Hugo Chavez".

Hostile opponents

Chavez is keen to lay the groundwork to extend his rule beyond 2013, when his six-year term ends.

But the setbacks in Miranda and Zulia could force Chavez to contend with hostile opponents with revived national clout.

Chavez's older brother was in a tight race to succeed their father in their home state [AFP]

Chavez already has a congress filled with supporters and a supreme court that critics say is in his pocket as he tries to hold on to power in state houses and city halls.

Candidates included Chavez's older brother Adan, who was in a tight race to succeed their father as governor of Barinas, Chavez's home state.

Chavez's ex-wife Marisabel Rodriguez was also on the ballot but on the opposition side.

Rodriguez, running for district mayor in her hometown, Barquisimeto, said her campaign may have been local but it was also "against the danger posed to democracy by leaving a single person in power for a long time".

"In spite of Chavez's popularity and that he has won a majority of the states, he has not won the support of a sector of the [Venezuelan] society," our correspondent said

"The government will have to work on how to win them back."