* Local elections on Sunday seen as referendum on Erdogan
* In devout central Anatolia, faithful dismiss graft affair
* Residents point to development, see scandal as plot
By Alexandra Hudson
KONYA, Turkey, March 29 (Reuters) - If Prime Minister Tayyip Erdogan is fighting the toughest battle of his political career as corruption allegations swirl and elections approach, Turkey's conservative Anatolian heartlands appear to have his back.
Here, far from dividing his pious core supporters, the graft scandal and bitter power struggle with a U.S.-based cleric have served only to stir more devotion to a man they see as Turkey's greatest modern leader, delivering hospitals and schools and breaking the grip of secular elites over the past decade.
The run-up to pivotal local elections on Sunday has been overshadowed by a corruption affair that has seen almost daily recordings published anonymously on social media claiming to show illicit dealings by Erdogan's inner circle.
One senior official called the crisis "one of the biggest in Turkish history" and the government has responded by blocking Twitter and YouTube, drawing public anger and international condemnation.
But in Konya, a conservative city that gave Erdogan's AK Party 70 percent of the vote in a 2011 general election, many see the scandal as the prime minister does: part of a "dirty plot" to unseat him by ruthless and immoral political enemies.
"Nothing but lies," said 19-year-old Konya student Hatice Kubra, following the party line that U.S.-based cleric Fethullah Gulen, a former Erdogan ally whose followers say they number in the millions, was responsible.
"Allah sees everything. Allah knows what Hoca (teacher) Fethullah is doing," she said at an AK Party rally on Friday.
"A flock of swines that stormed our spiritual gardens," read one banner, referring to Gulen and his followers.
Tens of thousands turned out for the rally, turning Konya into a sea of AK Party flags and colourful Muslim headscarves. Some wore masks of Erdogan's face, while old men scaled trees for a sight of their hero, only to be bitterly disappointed when he cancelled after orders to rest his voice.
The AK Party's billboards praise their "ten golden years" in charge of Konya municipality, and opposition parties barely bother to campaign here.
Thursday brought the release of a recording of top security officials discussing possible military action in Syria. Among those bugged was Foreign Minister Ahmet Davutoglu, member of parliament for Konya. He received a rapturous welcome when he took to the stage to speak in Erdogan's place.
"Are you ready to give our prime minister an even bigger share of the vote this time Konya?" he asked to cheers.
In this city, where shopping centres, smart residential blocks and industrial parks have developed around the tomb of Rumi, a revered 13th-century poet and Sufi mystic who inspired the forming of Turkey's iconic whirling dervishes, there is a treasured sense of well-being, prosperity and upward mobility - ascribed to Erdogan's vision and management.
A population of observant Muslims with strong business nous - who for decades felt sidelined in a state run by secular elites and their chaotic coalition governments - feels their hour has come.
"We have hospitals at our doors, doctors, picnic places, the fast train to Ankara," said Leyla Eroglu, a 54-year-old mother of six, a huge banner of Erdogan's face tied around her body.
"Turkey before was horrible, constant fighting between right and left, we couldn't live easily. Erdogan is our second Ataturk," she said, referring to the modern republic's revered founder, Mustafa Kemal Ataturk, almost a century ago.
A wave of protests last summer in major cities against Erdogan's domineering leadership style highlighted tension in Turkish society between a largely secular segment of the middle classes, mostly in Istanbul or on the tourist-orientated coastline, and religious conservatives such as those in Konya.
The blocking of Twitter and YouTube in recent days were seen as further evidence of Erdogan's authoritarian instincts, particular among a tech-savvy younger generation.
But not all of Turkey's youth are critical.
"When I go to vote I will think about everything they have given me," said 21-year-old Cihat Ozer, in Konya's gleaming and spacious municipality student centre opened in 2009, the year of the last local election.
Back then the centre had just one university to cater for, providing free extra-curricular courses and laundry services, as well as a soup kitchen and 24-hour study rooms. Four more universities have since opened in the rapidly growing city.
New wooden gazebos dot velvety lawns along the main avenues. Historic mosques have been restored, electricity is generated from waste, a new football stadium is being constructed, and an already impressive airport is being revamped and expanded.
Ozer acknowledged fellow students sometimes grumbled about Erdogan's more reactionary policies, although he defended the block on Twitter as the premier battles the graft scandal.
The 30-year-old head of the AK Party youth wing, Ahmet Izi, pointed to a large framed photo portrait of Erdogan hanging in his office, showing a youthful looking prime minister at the time he took office in 2002.
"Look at him now. He has become an old man. That is from working and working for this country," he said, a message that seemed to resonate with the supporters as Friday's rally.
"Yes, sometimes Erdogan is very aggressive. But people love him for that reason. He is just like them. He doesn't play games," Izi said. "He is a man of the people." ($1 = 2.1909 Turkish Liras) (Editing by Nick Tattersall/Mark Heinrich)
Our Standards: The Thomson Reuters Trust Principles.