The opposition registered wins in key parts of Venezuela
Venezuela's opposition has made gains in regional polls, but allies of President Hugo Chavez have held on to 17 of the country's 22 governorships.
The opposition won five states, including the two most populous, and won the mayoral election in Caracas.
The polls were regarded as a critical test for Mr Chavez, whose allies until now controlled 21 states.
The president said the outcome of the vote was an endorsement of Venezuela's "socialist project".
With more than 95% of votes counted overall, results showed the opposition winning Miranda and holding onto Zulia, the two states with the largest electorates.
The state of Nueva Esparta remained in opposition hands, while opposition candidates were also on course to win Tachira, which borders Colombia, and Carabobo, considered the industrial heartland of Venezuela.
They also won mayoral elections in Caracas - formerly held by a Chavez supporter. The post is seen by some as the second most important job in the country.
Mayor-elect Antonio Ledezma called on the government to work with him to "rescue Caracas" from problems such as rising crime and ageing infrastructure.
Speaking to the nation shortly after the first results were announced, Mr Chavez was quick to recognise the victories of his main opponents.
"We lost the governorship of Miranda and we recognise the triumph of our adversaries," he said.
"How can anyone say there is a dictatorship in Venezuela? I, as head of state, recognise their triumphs and I hope that they'll recognise the head of state."
Mr Chavez's Socialist Party also made gains. The party's candidates held onto the state of Sucre, the central Caracas district of Libertador and the president's home state, Barinas, where his brother was elected governor.
The BBC's Will Grant in Caracas says the results have enabled both sides to claim some sort of success.
The outcome signals that the opposition has strengthened in recent years, our correspondent says, while President Chavez will argue that victories in more than three-quarters of the country is evidence that his socialist agenda is supported by the majority of Venezuelans.
"A new stage is beginning," Mr Chavez said. "For me, as the leader of the Venezuelan socialist project, the people are telling me: 'Chavez, keep on the same path.'"
Opposition leader Manuel Rosales said: "What's important is that the map of Venezuela has started to change."
Officials estimated turnout at 65% of Venezuela's 17 million eligible voters, a record for local elections in recent years.
As well as governorships, more than 300 mayoral positions were up for grabs.
The electoral commission described the conduct of voters as exemplary.