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.
iRGPn5SwiqcThe US House Ethics Committee has voted to release its report on former Republican Representative…
ABC News has agreed to pay $15 million to President-elect Donald Trump to settle a…
South Korea’s parliament has voted to impeach President Yoon Suk Yeol over his failed attempt…
Israeli war planes have carried out more than 100 air strikes in Syria on December…
President-elect Donald Trump has threatened to impose 100% tariffs on the BRICS countries if they…
Syrian troops have withdrawn from the city of Aleppo following an offensive by rebels opposed…