The religiously devout but charismatic prime minister is now seeking to extend his 11-year domination of Turkey by standing in a presidential election that would make him Turkey's longest serving ruler since its founding father Mustafa Kemal Ataturk.
But the man dubbed the "Sultan" is enduring the most turbulent phase of his career, accused of being an autocrat and lashing out erratically at critics, from former allies to Twitter users.
Months of political turmoil in the wake of the Gezi street protests have cast a shadow over Erdogan, once hailed as an emerging global player after Turkey's decade of unprecedented growth.
"I am not a dictator. It is not even in my blood," he said last year.
But as tales of official graft and sleaze spread through social networks, the 60-year-old has become increasingly irritable and combative, branding his critics "traitors" and "terrorists".
The anger come to a head over his response to the mine tragedy in the western town of Soma in May that claimed 301 lives, when he apparently attempted to downplay the incident by comparing it to mining disasters in 19th-century Britain.
Yet he can still count on solid support among rural Turks as well as many religious business people who have prospered under his rule.
Soner Cagaptay, director of the Turkish Research Programme at The Washington Institute, said Erdogan's economic record and effective use of his image as an "authoritarian underdog" would likely see him win the elections.
Erdogan was credited with bringing stability to Turkey after decades of frequent coups and rocky coalitions, and clipping the wings of the powerful military.
A fan of new bridges, airports and other megaprojects, he has transformed what was once an economic basket-case into a robust market, tripling the income of ordinary Turks and reining in runaway inflation.
It was plans for another new development, an Ottoman-style shopping mall that would concrete over Istanbul's Gezi park, that sparked unprecedented protests against him last June, which police broke up with truncheons, plastic bullets and tear gas.
The unrest was followed in December by a wave of leaked phone recordings that spread on social media, with murky tales of ministerial bribe-taking, gold smuggling, illicit Iranian deals and shoeboxes stuffed with cash.
Erdogan had to reshuffle his cabinet after three ministers caught up in the scandal were forced to resign. He tried to hit back at his "enemies" with a botched crackdown on the Internet, including a ban on Twitter that was later reversed.
Erdogan blames the troubles on an erstwhile ally, the powerful US-based Muslim preacher Fetullah Gulen, firing off almost daily tirades about coup plots and foreign conspiracies to bring down his government.
Erdogan's overwhelming election successes have led to his increasingly authoritarian style, according to Ilter Turan, professor at Istanbul's Bilgi University.
"Since he took office, the prime minister has gradually shifted from pragmatist tendencies to ideological ones, from teamwork to personal decisions, from democracy to authoritarianism, from thought-out policies to impulsive ones," he said.
The son of a coastguard officer in Istanbul's harbourside neighbourhood of Kasimpasa, Erdogan sold bread and lemons on the streets as a teenager.
He joined Islamic youth groups that challenged the era's secular-nationalist regimes and the coup-happy generals who saw it as their duty to ensure a strict separation between mosque and state.
Erdogan, a one-time semi-professional football player and a business graduate, became mayor of Istanbul in 1994, and set about tackling urban woes such as traffic gridlock and air pollution in the megacity of more than 15 million people.
When his religious party was outlawed, he joined demonstrations and was briefly jailed for allegedly reciting an Islamist poem which the court regarded as incitement to religious hatred.
"The mosques are our barracks, the domes our helmets, the minarets our bayonets and the faithful our soldiers," read the controversial poem he recited -- words he has repeated again and again on the campaign trail.
In 2001 Erdogan and his long time ally, current President Abdullah Gul, co-founded the Islamic-rooted Justice and Development Party (AKP), which scored a landslide win the following year and two more victories since.
A formidable campaigner, even illness did not stop him going from city to city addressing monster rallies of supporters, often draped in the scarf of the local football team.
His party introduced a series of reforms to bring Turkey closer to the European Union but talks about eventual membership have since stalled amid angry recriminations from Erdogan that Turkey will not wait for ever.
In recent years Erdogan has eased restrictions on women wearing the veil, limited alcohol sales and made efforts to ban mixed-sex dorms at state universities, moves seen by his critics as a part of an agenda to Islamise the staunchly secular society.
"I do not subscribe to the view that Islamic culture and democracy cannot be reconciled," he once said.
Defenders of Turkey's secular regime introduced by Ataturk accuse Erdogan of trying to erase his legacy, but Erdogan boasts of transforming the country from a coup-prone economic weakling into the regional power Ataturk wanted it to be.
COMMENTS (3)
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ
hahahaha " this is possible in India because Hindus don’t vote based on religion."
Of course, they only vote by caste!!!!!
@someone: Well Mr. Erdogan sounds like Modi of Turkey. Erdogan says the mosques are our barracks, while Modi says 'build toilets before temples'. Huge difference. Modi comes from a nationalist and not a religious background - he has demolished over 200 illegally constructed temples during his tenure as CM in Gujarat; naturally this is possible in India because Hindus don't vote based on religion.
Well Mr. Erdogan sounds like Modi of Turkey.