The fast-moving police enquiry that struck at the heart of Turkey's ruling political elite, including sons of government ministers and businessmen, has thrown up a serious challenge for Erdogan's Justice and Development Party (AKP), which already weathered mass street protests in June.
But instead of students and the secular opposition, a onetime ally is at the heart of the crisis: Fethullah Gulen, a reserved but deeply influential imam based in the United States who still holds a commanding clout in the corridors of Turkish power.
Though he communicates largely through video messages, Gulen remains a towering presence, with followers holding key positions in the police, judiciary and secret services in a network Erdogan allies call a "state within a state".
It is this secretive, parallel network that AKP loyalists accuse of trying to sabotage the government through a "dirty" corruption investigation against some of the most important names in Turkey's ruling-party elite.
Conflict bursts into open
=========================
Cracks in the once tight relationship between Erdogan and the Gulen movement have been deepening for years, but with the crisis now in the open, the outcome of elections next year could hang in the balance.
"It already appears that we will witness the toughest elections in the republic's history," said political analyst and journalist Rusen Cakir, referring to local polls in March.
"But the fact that one of the camps in this fight has no political party is complicating the matter."
The local elections on March 30, including a contest for the control of Turkey's largest city Istanbul, are now being seen as a key indicator of where the political fault-lines lie nation-wide.
"The race for Istanbul has always been closely contested between the AKP and the secular/leftist opposition," said Soner Cagaptay, director of the Turkish Research Programme at The Washington Institute.
"If the Gulen movement can now use its influence among voters and the financial base to tilt the race in favour of the opposition, it will prove itself as an effective power against Erdogan," he added.
The stakes are high for Erdogan. Fast in the tracks of the local polls are presidential elections in August, which for the first time will be open to all voters.
It is widely expected that the still popular Erdogan will run and eventually replace his longtime AKP acolyte Abdullah Gul, if the constitution is changed to give the post US-style executive powers.
But the anti-corruption platform that has long served the party is now tarnished, columnist Kadri Gursel wrote in the Milliyet newspaper.
The AKP, he wrote, has long claimed to be the national bulwark against the corruption disease, but since the December 17 probe, this image of purity has been exposed as "fake".
The party taking its name from AK Party --AK means "white" and "clear" in Turkish -- has climbed to power with the claim to eradicate the chronic problem of corruption which erased its predecessors from political scene.
Fiercely trying to preserve their domination, Erdogan and the AKP are fighting hard against the Gulen movement.
Once the corruption probe launched, Erdogan countered by purging senior police officials including the Istanbul police chief who oversaw the raids and appointed a little-known governor as the new chief.
And in a sign that Erdogan refuses to take the probe at face-value, the government has refrained from steps to sanction ministers caught up in the probe, though some reports said a comprehensive reshuffle was in the works.
This showdown between Erdogan and Gulen is "not surprising", said Cagaptay.
"The movement has its own media, universities, think-tanks, and businesses and followers in the bureaucracy and appears to be the only force that can challenge Erdogan."
But, he added, if Erdogan won the race despite Gulenists, he would be confirmed as "Turkey's most dominant political figure in modern history as well as having subjugated the Gulen movement."
AFP