By Daniel Wallis
CARACAS (Reuters) - Venezuelans vote in municipal elections on Sunday that are the biggest political test yet for President Nicolas Maduro as he tries to halt an economic slide and preserve the radical socialist legacy of his late mentor Hugo Chavez.
The outcome of the ballots to choose 337 mayors and 2,523 councilors will be seen as a sign of Maduro's strength, nine months after Chavez died from cancer and he narrowly beat opposition leader Henrique Capriles to win the presidency.
The opposition portrays Maduro as a buffoonish autocrat with none of his predecessor's political savvy, and says his economic policies have been a disaster for the OPEC nation.
Maduro, a burly 51-year-old former bus driver, says his "treasonous" rivals are colluding with U.S. financiers to try to drive him from power, but that "Chavismo" is stronger than ever.
"They have allowed themselves to be influenced by foreign forces ... They've made a mistake and I think they are going to pay dearly," he said ahead of the vote.
The opposition says the allegations of foreign meddling are a smokescreen to distract voters from a dire economy: slowing growth, annual inflation of 54 percent, and dollars on the black market fetching ten times the official exchange rate.
Maduro says opposition-linked businessmen are behind an "economic war" that he blames for embarrassing shortages of basic goods ranging from milk to toilet paper and car parts.
In moves that echo Chavez's many clashes with the private sector, Maduro has ordered companies to slash prices - delighting millions of consumers - and even sent troops to occupy a large electronics retailer he accused of price-gouging.
One music video on state TV sings his praises in a play on the name Saint Nicholas, the model for Santa Claus: "People of peace, lower your prices! Nicolas has arrived!"
The president has declared Sunday a day of "loyalty and love" for Chavez. It also coincides with the last of three days of mourning in Venezuela for South Africa's Nelson Mandela.
Capriles scoffed at Maduro's comparison of the deceased.
"Mandela was an example of love, peace and unity, the exact opposite of those who govern our country!" the opposition leader said on Twitter. "Vote for a better Venezuela with leaders who work to improve everyone's quality of life."
The election carries much less weight than the presidential battle between Capriles and Maduro in April, and Capriles' loss to Chavez in October last year. But mayors are important in Venezuelan politics because they receive a considerable portion of the country's oil revenue.
The government looks likely to win an overall majority of municipalities thanks to its strength in rural areas, where most of the mayorships are located, while the opposition wants to keep control of major cities such as Caracas and Maracaibo.
Both sides hope to win the total popular vote - which is expected to show the country split down the middle, as in the last two elections - although a final count could take days.
Investors are watching the ballot for indications as to whether Maduro will have the strength to push through unpopular economic measures, such as a currency devaluation that would help government finances but also spur inflation.
Recent moves to cap commercial rents, regulate the car market and boost interest rates for low-income savers have largely been dismissed by private economists as populist steps that will do little to solve deeper structural problems created by a decade of price and currency controls.
Forcing businesses to cut prices ahead of Christmas is popular with Venezuelans sick and tired of the fast-rising cost of living, and Maduro's "economic offensive" could have halted, or even reversed, a decline in his personal approval ratings.
"It is clear that, essentially, the idea is to stay in power, not the development of the country or people's welfare," said Asdrubal Oliveros of local consultancy Ecoanalitica, which is often critical of the government.
Symbolizing the ideological chasm that separates both camps was the passing into law last week of Chavez's "Plan for the Fatherland": a grandiose scheme which ranges from continuing the "construction of socialism" to "saving the human race."
At a ceremony in the military museum where Chavez is buried, Maduro reverentially laid a bound copy of the law on the coffin.
And he said he would invite all the winning mayors to the Miraflores presidential palace on Tuesday to read it to them.
"This plan is the result of centuries of struggle," he said, "written by the exceptional, extraordinary leader who still commands the hearts of the majority of people in this country."
(Reporting by Daniel Wallis; editing by Jackie Frank)