According to Venezuela’s National Electoral Council, the governing United Socialist Party (USP) has won the greatest share of the vote in Sunday’s local elections.
With most votes counted, the USP has 49% while the opposition has about 43%.
The opposition was ahead in most of the larger cities, including the capital, Caracas, while the governing party won in rural areas.
The elections have been seen as a key test for President Nicolas Maduro, who replaced the late Hugo Chavez in April.
Since November, Nicolas Maduro has been ruling by decree, promising to tackle corruption and control price rises.
The opposition accuses Nicolas Maduro of failing to deal with crime, inflation and a shortage of basic goods.
Local elections in Venezuela are usually low key, but this one was filled with expectations for the government and the opposition.
Voters were electing mayors to 337 municipalities and officials to more than 2,000 city councils.
The opposition won mayoral races in the capital, Caracas, and the country’s second city. Maracaibo. They also won the capital of Barinas, from where former Hugo Chavez hailed.
So far, the USP has won in 196 of the municipalities being contested, while the opposition took 53, and independents another eight. The remainder have yet to be declared.
Nicolas Maduro called the results a “grand victory”, telling supporters at a rally in Caracas that “the Bolivarian Revolution continues now with more strength”.
The opposition’s failure to win a majority of the votes cast or significantly increase the number of municipalities under its control from the 46 won in the 2008 local elections was a disappointment to its leader Henrique Capriles.
Sunday’s elections coincided with the anniversary of Hugo Chavez’s famous speech in which he announced that his cancer had returned and named Nicolas Maduro as his preferred successor.
[youtube iRGPn5Swiqc 650]