Venezuelans voted on Sunday in an opposition primary expected to name a young state governor to challenge Hugo Chavez later this year at a close presidential election in South America's top oil exporter.

With all of Venezuela's 18 million registered voters able to take part, all eyes were on turnout as the clearest test yet of the opposition's strength and chances of ending 13 years of Chavez's socialist revolution.

The reaction of Sunday's losers will show if the fledgling Democratic Unity coalition is ready to rally behind the winner and mount a dynamic campaign for the October 7 election that could chip away at the president's still-dominant popularity.

Miranda state governor Henrique Capriles, 39, is the frontrunner with a lead of as many as 20 percentage points over another governor, Pablo Perez, 42, and three other candidates.

I aim to be a president who talks much less, who doesn't invade Venezuelans' personal lives so much, Capriles said in a pointed reference to Chavez's longwinded speeches, which local media are often obliged to run live.

The real game begins on February 13, he added, relishing the chance of a showdown.

Capriles hails Brazil's market-friendly but socially conscious policy model as his inspiration and has said he would take a no shocks approach to dismantling Chavez's statist economic policies such as currency controls.

He might move faster to end controversial friendships with anti-U.S. figures such as the leaders of Iran, Cuba and Belarus.

RISK OF TROUBLE

Across Caracas, pro-opposition neighbourhoods were plastered with posters above young volunteers handing out fliers, while Chavez strongholds were devoid of any opposition propaganda.

Reading a newspaper in a sunny square deep in the pro-government 23 de enero area, 66-year-old retired pharmacy assistant Ramon Paraera said no one would beat the president.

Chavez is helping the people. He's with the people, not the bourgeoisie. Capriles is with the rich people, he said, sitting below a mural of revolutionary heroes including Che Guevara.

Results from the voting were expected late on Sunday. If Capriles is anointed as Chavez's official challenger, supporters in the OPEC nation will hope his opposition colleagues quickly, and convincingly, endorse him for the uphill battle ahead.

We will all wait for the results arm-in-arm, Perez said.

Peru's conservative Nobel literature laureate Mario Vargas Llosa praised the coalition this week for transcending the divided, mediocre opposition of Venezuela's past and avoiding cannibalism during the primary - in contrast to the U.S. Republican race going on to the north.

Who says there can't be a Venezuelan spring? he wrote.

Polls put Chavez well in the lead for October, but that could change if the opposition runs an appealing and inclusive campaign. Some experts warn that political violence could undermine the outcome - whoever wins the general election.

Venezuela has largely avoided political bloodshed despite the deep polarization of Chavez's rule and a volatile mix of police corruption, the presence of organized criminal gangs, impunity and millions of guns in civilian hands.

The opposition has accused the defense minister of planning to reject any opposition win on October 7, further fuelling mistrust and threatening to break what the International Crisis Group think tank called a fragile equilibrium.

'ARE WE A COLONY?'

At stake is control of the biggest crude reserves in the world and state oil company PDVSA, which despite declining output still sends more than three quarters of a million barrels a day to the United States and about half a million to China.

Chavez has nationalized almost all Venezuela's oil industry over the years, kicking out U.S. majors and putting PDVSA in charge of multibillion dollar projects. The opposition deny government allegations they plan to privatize the company.

Energy minister and PDVSA boss Rafael Ramirez said this week that the opposition had a hidden agenda for the oil industry.

They don't want to say much because what they're proposing is a retreat from everything that we've done ... to the detriment of our sovereignty and people, he told state TV.

As well as turnout, Venezuela watchers will keep a close eye on any signs of a surprise surge by Perez, and several close-run opposition mayoral races: surprises there could undermine faith in pollsters who have had Capriles in the lead for months.

Chavez is sure to try to steal the show. His apparently robust recovery continues after cancer surgery last year and he is making ever longer TV appearances, including a record speech last month of nearly 10 hours.

On Sunday, the 57-year-old visited north-central Aragua state to celebrate the 198th anniversary of the Batalla de La Victoria (Battle of Victory) there against Spanish forces.

Any candidate from the ranks of the Venezuelan right is the candidate of dependency, of anti-independence, he slammed his foes this week, denouncing them as U.S. puppets and sell-outs. The first, vital issue is: are we free, or are we a colony?

(Additional reporting by Girish Gupta; Editing by Andrew Cawthorne and Sandra Maler)