* Correa claims victory, opponents accept defeat
* Count goes through night but little doubt over result
* Vote to boost president's power base, worries foes
* Foreign investors unlikely to face any new measures
By Eduardo Garcia and Alexandra Valencia
QUITO, May 8 President Rafael Correa vowed a shake-up of Ecuador's courts after a referendum seemed to strengthen his grip on the OPEC member nation while heightening foes' fears of autocratic rule.
Ballots being counted into Sunday showed the leftist leader ahead on all 10 reforms he put to Ecuadoreans in a referendum that is seen as an early indicator of Correa's prospects in a possible 2013 re-election bid in the Andean country.
With 20 percent of ballots counted, the 'Yes' vote's range for the questions was 45 to 51 percent compared with 39 to 44 percent for 'No'.
But even before complete results, Correa declared victory, opposition leaders accepted defeat and government supporters began celebrating a few hours after voting ended on Saturday.
"We have to make big changes in the next 18 months. We're going to face the opposition of mafias within the judiciary," said Correa, 48, whose declared intention with the referendum was to eradicate corruption and inefficiency in courts.
Full coverage of Ecuador's referendum [ID:nECUADOR]
Political risks in Ecuador [ID:nRISKEC]
In office since 2007, Correa should now be empowered to name one of three members of a panel charged with reforming the judiciary and appointing judges to the Supreme Court and lower courts. Allies will effectively choose the other two members.
Other reforms should allow the government to limit media ownership and hold journalists "responsible" for stories -- moves critics say threaten freedom of expression.
Victory should also help Correa to rein in dissent in the ruling Alianza Pais movement and better control parliament.
"Correa's victory makes it difficult to talk in any serious way about the separation of powers in Ecuador," said a U.S. analyst of the region, Michael Shifter.
Having won two presidential elections, Correa is widely expected to try again, although he has said he may prefer to retire with his wife to her homeland in Belgium.
"It's a little too soon to say it's a done deal but I have talked to our sources in Quito and they said they thought this was going to be the beginning of the 2013 campaign," said Eurasia Group consultancy analyst Risa Grais-Targow.
"TIME FOR MEDITATION"
Analysts do not expect Correa to take any dramatic new measures against foreign investors, whom he has already largely strong-armed into deals more favorable to the state.
"I think in the oil sector he's really already gone as far as he can go," Grais-Targow said, referring to the recent renegotiation of foreign companies' contracts in Ecuador.
The energetic and eloquent Correa forms part of a regional alliance of leftist Latin American presidents that includes Hugo Chavez in Venezuela and Evo Morales in Bolivia.
Constant critics of U.S. "imperialism," they have sought to boost state revenues from oil and mineral resources to fund social spending.
Major opposition figures acknowledged Correa's win but said he should take a conciliatory attitude given that the margin did not appear to be as big as the government had forecast.
"It wasn't a thrashing," the president's brother and critic Fabricio Correa told Reuters. "It's time for meditation not triumphalism." [ID:nN07159955]
Correa's big spending on schools, roads and hospitals has kept him popular with the poor and lower-middle classes.
"People have seen some real improvements in their lives. They've doubled healthcare spending as a percentage of GDP," said Mark Weisbrot, co-director of the Center for Economic and Policy Research think-tank in Washington.
Rivals accuse Correa of having an autocratic streak akin to Chavez in Venezuela and fear he may use the referendum boost to clamp down on foes. But Correa, the strongest leader in decades in a country notorious for political instability, denies that.
"We are here to change our Ecuador in peace and democracy," he said. (Additional reporting by Jose Llangari and Santiago Silva in Quito, Mica Rosenberg in Bogota; Writing by Andrew Cawthorne; Editing by John O'Callaghan)
Our top photos from the last 24 hours.