CARACAS (Reuters) - Venezuelans vote on Sunday in nationwide mayoral polls boycotted by major opposition parties and likely to help leftist President Nicolas Maduro consolidate power ahead of a probable 2018 re-election bid.

Venezuela's President Nicolas Maduro (2nd L) and his wife Cilia Flores (2nd R) inspect the rebuilding of the Humboldt Hotel, a state-run hotel, at the Avila mountain in Caracas, Venezuela December 7, 2017. Miraflores Palace/Handout via REUTERS

After withstanding massive street protests, international sanctions and dissent within his ruling Socialist Party, the 55-year-old president saw his candidates win a surprise majority in October gubernatorial elections.

Now, with 335 mayorships up for grabs, the socialists seem certain to repeat the feat, helped by opposition abstentionism, which would delight Maduro after the international opprobrium he has faced all year.

The crumbling opposition coalition’s main parties - Justice First, Popular Will and Democratic Action - have opted out of Sunday’s vote, alleging the election system is biased and designed purely to keep a “dictatorship” in power.

“It is crazy not to participate,” said political analyst Dimitris Pantoulas. “The government most likely will have one of the best results in its history ... Maduro will be very strong after this election. He has the political momentum.”

The socialists already hold more than 70 percent of Venezuela’s mayorships, and are forecast to increase that share, extending their grip at a grassroots level just as Maduro mulls standing for a second six-year term in the OPEC nation.

Despite presiding over one of the worst economic meltdowns to hit any country in modern history, and with ratings barely half when he was elected, Maduro is enjoying a political upturn after the October gubernatorial vote.

He is the favorite to be the government’s candidate at the 2018 presidential election and could win if the opposition does not re-unite and re-enthuse supporters.

“DON’T THROW IN THE TOWEL”

Slideshow ( 10 images )

Despite the boycott by major parties, moderate opposition supporters were still planning to vote on Sunday, arguing that it was the only way to stop the socialists amassing power.

Some of the smaller parties are fielding candidates, fuelling acrimony and in-fighting within the coalition.

“There’s huge frustration at everything that has happened this year ... but we cannot throw in the towel,” said one of those candidates, Yon Goicoechea of Progressive Advance party.

Just out of jail for allegedly plotting against Maduro, Goicoechea was running for El Hatillo mayorship outside Caracas. “I can’t say when we will achieve democracy - maybe months, maybe years - but we have to fight with our only weapon: votes.”

The election was taking place at the end of a fourth year of crushing economic recession that has brought hunger, hardship and shortages to Venezuelans. Yet with the opposition in such disarray, Maduro and his allies are buoyant.

“We are going to have a great victory!” said Erika Farias running for a Caracas district mayorship. “We are fulfilling the legacy of our ‘commander’ Hugo Chavez.”

With many Venezuelans angry at both the government and opposition, some independents have registered for Sunday’s mayorship races, though there is still no sign of a third-way presidential candidate.

“The country is demanding an alternative. Mine is a protest campaign,” said Nicmer Evans, running against Farias in the capital’s Libertador district for his recently-founded party, New Vision For My Country.

As well as the mayoral elections, voters in oil-rich western Zulia state were choosing a new governor.

The opposition took that state in the October gubernatorial race but the election was annulled after winning candidate Juan Pablo Guanipa refused to swear loyalty to a pro-Maduro legislative superbody.

Results were expected to start coming in on Sunday evening.