Turkey PM Erdogan claims election victory
Turkey's Prime Minister Recep Tayyip Erdogan has claimed victory for his party in local elections, and vowed that his enemies would "pay the price".
Mr Erdogan's government has been accused of authoritarianism and corruption after a string of scandals.
The local elections, the first vote since mass protests last June, were seen as a barometer of his popularity.
Mr Erdogan was not standing for election but campaigned hard for his Justice and Development Party (AKP).
With over 60% of the votes counted, it was leading the main opposition party 47% to 27%.
If the early results of Turkey's local elections are confirmed, Recep Tayyip Erdogan will have won six consecutive nationwide polls. He's done so by maintaining a solid base of support among the working class and the religious. Years ago, Mr Erdogan worked out what may be a simple, unavoidable fact: these two, overlapping groups outnumber Turkey's liberal, secular elite. Hold on to that large base, and you hold on to power.
In this latest election, Mr Erdogan was helped by the opposition's failure to unite itself into a single anti-government movement. The opposition may now fear further government moves to assert its power over the judiciary and the internet.
What will Tayyip Erdogan do next? He may choose to run for president when direct elections are held for the first time this summer. But active power resides with the prime minister. Some commentators believe that Mr Erdogan's AK Party may rewrite its own rules to allow its leader to run for a fourth term of office in 2015.
The AKP had been aiming to equal or better its 38.8% share of the vote in the last local elections in 2009.
Speaking from a balcony at his party's headquarters in Ankara, Mr Erdogan thanked his supporters.
"You stood up for Turkey's ideals... for politics, for your party and your prime minister," he said.
But he warned he would "enter the lair" of enemies who had accused him of corruption and leaked state secrets. "They will pay for this," he said.
Voting in the local assembly and mayoral elections passed off peacefully in most areas, but eight people were reportedly killed in two separate incidents involving supporters of rival candidates.
Feuding families were said to have clashed in the southern city of Hatay and the eastern province of Sanliurfa.
The prime minister has been eyeing a run for the presidency in August - the first time voters will directly elect the head of state - or may seek to change the rules to allow him to seek a fourth term in office.
The BBC's James Reynolds in Istanbul says Mr Erdogan's success is due to a solid base among religious and working-class groups across the country.Online 'misinformation'
In the run-up to Sunday's poll, the government blocked Twitter and YouTube, following a series of online leaks.
Mr Erdogan said social media was spreading misinformation.
On Saturday pro- and anti-government factions held rival demonstrations in Istanbul, which saw the Gezi Park protests of May and June last year.
The secular opposition Republican People's Party (CHP) is fighting to win the Istanbul mayor's office from Mr Erdogan's ally Kadir Topbas. However, early results put the AKP ahead.
Mr Erdogan is a former mayor of the city and the vote there has become an unofficial referendum on his administration.
The race looked tighter in the capital Ankara, with Erdogan's party narrowly leading the CHP.
The loss of either city would be a major embarrassment for the prime minister.
While the ruling party celebrates, the main opposition CHP finds itself in the firing line, accused of failing to seize the moment when the AKP is vulnerable.
A blogspot by Haluk Temel in the leftist Radikal newspaper said: "The message from the electorate is very clear. The government in Turkey will not change until the opposition changes."
Kadri Gursel from the centrist Milliyet daily said the CHP "did not reach the 30% mark at a time when the government is shaken by corruption allegations. This is a challenge for the party leadership."
Murat Yetkin says in today's edition of the centrist Hurriyet Daily News: "Half of the corruption claims would have been enough to bring down the government in any other democratic country. In Turkey, all it amounted to was a 5% drop in support."
Translation and analysis by BBC Monitoring
More than 50 million people are eligible to vote, and turnout in the local elections appeared to be high.'Foreign plot'
The prime minister has purged hundreds of people from the judiciary and police since several of his allies were arrested over a corruption scandal in December.
He has accused the judiciary of being behind a series of wiretaps and social media leaks allegedly exposing major corruption.
The scandal has pitted the prime minister against a former ally, US-based Islamic scholar Fethullah Gulen, who has many supporters in the police and judiciary.
Mr Erdogan accuses Mr Gulen of using his supporters in a "dirty campaign" to try to topple him.
Mr Gulen denies the allegations but those close to the movement, known as Hizmet ("Service"), say they fear a crackdown after the elections.
The Islamist-rooted AK Party swept to power in 2002 on a platform of eradicating the corruption that blights Turkish life.
It was backed by a pious Muslim base looking for greater standing in a country that historically favoured a secular elite.
The government faced major street protests last year sparked by plans to raze Istanbul's Gezi Park and redevelop it. The police crackdown galvanised anti-government demonstrators in several cities.
The anger flared up again earlier this month, with the news of the death of a 15-year-old boy who had been in a coma since last June after being hit by a tear gas canister during a protest.