UPDATE 1-Erdogan vows Turkish graft affair will fail to topple him
* Erdogan defiant after protests rock Istanbul
* Clerical rival Gulen promises Turks better days
* Foreign minister urges critics to soul-search
By Seda Sezer and Dan Williams
ISTANBUL, Dec 29 (Reuters) - Turkish Prime Minister Tayyip Erdogan swore on Sunday he would survive a corruption crisis circling his cabinet, saying those seeking his overthrow would fail just like mass anti-government protests last summer.
Erdogan accused his opponents of trying to sap the power of Turkey, which has seen rapid economic growth and assertive foreign policies under his 11-year leadership, in the service of an international plot cloaked as criminal proceedings.
Yet striking a somewhat milder tone, Foreign Minister Ahmet Davutoglu appeared to seek common ground with a U.S.-based Turkish cleric whose rivalry with Erdogan is widely seen as having stoked the controversy.
On Friday, thousands of Turks demanding Erdogan step down clashed with riot police in central Istanbul. The trouble recalled protests in mid-2013 which began over development plans for the city's Gezi park but broadened into complaints of authoritarianism under Erdogan's Islamist-rooted AK party.
Erdogan, who is touring Turkey to drum up support before local elections in March, defied his accusers over the detention for suspected graft of three ministers' sons and the head of state-run Halkbank on Dec. 17.
"They said 'Gezi' and smashed windows. Now they say 'corruption' and smash windows. These conspiracies will not succeed," he told a cheering crowd in western Manisa province. "Their concern is not corruption, law or justice. Their only concern is damaging this nation's power."
Erdogan's government has purged about 70 police investigators involved in the case, while financial markets have taken fright and one AK official said national elections could be brought forward from 2015 if the crisis persists.
Although 7 protesters and a policeman were killed in last summer's protests, Erdogan's popularity was almost unaffected in opinion polls. Analysts say this was due to his strong support among pious Turks and wealthy elites, as well as the diffuse nature of those demonstrations.
However, the current affair threatens to tarnish Erdogan's moral appeal and the crackdown on police has provoked a feud with the judiciary. Fretting investors have dumped Turkish stocks and pushed the lira currency to an all-time low against the dollar, a slide which a cabinet reshuffle failed to halt.
The case turned more personal last week when Turkish media published what appeared to be a preliminary summons for Bilal Erdogan, one of the premier's two sons, to testify. Erdogan, who denies any wrongdoing, said Bilal was named to hurt him.
Friday's unrest did not recur on Saturday or Sunday.
Unlike Erdogan's past confrontations with rivals such as the secularist military, the corruption scandal has exposed an internecine rift among powerful religious Turks.
Erdogan's allegations of a foreign hand in the affair put the focus on Fethullah Gulen, a Turkish cleric who preaches from self-imposed exile in the United States and whose Hizmet movement claims at least a million followers, including senior police and judges, in Turkey.
Gulen denies involvement in stirring up the graft case. But he regularly censures Erdogan, a ex-ally with whom he fell out in a dispute for control over an influential network of Turkish cram schools, which prepares students for university exams.
In a vaguely phrased sermon uploaded to Gulen's website over the weekend, the cleric likened the current situation to dark historical episodes when "the masses were the playthings of demagogues, put to sleep and awoken at will".
He predicted the "funeral of this chaos, and the sacred days when the nation will be on a path to relief, are close".
Erdogan has hinted strongly that Gulen deserved blame in the scandal. Davutoglu was more diplomatic on Sunday, saying Hizmet should credit the AK government for its achievements.
"We are praying with hope and understanding that what we did over the past 10 years will be seen, and that our friends, our brothers, will search their souls," he told Turkish TV.
German Foreign Minister Frank-Walter Steinmeier called for a thorough investigation of the graft allegations in remarks published in a Sunday newspaper. "In a region marked by crises and conflict we need Turkey as a stable anchor," he told Bild am Sonntag.
"We trust in the power of the Turkish state to investigate the corruption allegations irrespective of the persons involved," he said. "Succeeding in this is a measure of every state build on the rule of law."
The Erdogan government's crackdown on last summer's protests drew rebukes from several members of the European Union, which responded by postponing negotiations on Turkey's application to join the bloc.
The talks were revived in November but the EU warned Turkey last week to safeguard an independent judiciary.