But his uncompromising style is now working against him, as members of the middle class he helped foster make it clear they've had enough of his rule.
Though many see him as out of touch with his early commitment to individual freedoms and democratic reforms, Erdogan can still count on a powerful support base of conservative Turks. Though some Government officials have hinted at disagreement with their leader's approach, Erdogan has so far chosen confrontation over reconciliation, dismissing the demonstrators as rabble.
Erdogan, an ex-football player from a poor neighbourhood of Istanbul, has led his ruling party to a string of electoral landslides over the fractured political opposition. But Government opponents complain of unilateral decision-making and edicts that appear to be religiously motivated and pose a challenge to Turkey's secular principles.
Protesters vent their displeasure by calling the 59-year-old Prime Minister by his given name "Tayyip", a way of denigrating Erdogan because of his paternal demeanour, which would ordinarily command respect.
"Tayyip, winter is coming," warned one piece of protest graffiti. "Tayyip, would you like three kids like us?" read a sign held by a protester who lampooned Erdogan's calls for families to have three children.
Beril Eski, a 27-year-old editor at a television station, was not inclined to protest in the past. But she joined the demonstrations that have swept Istanbul because she felt insulted by police treatment of demonstrators and what she described as an overbearing Government led by a man given to provocative rhetoric.
"If he said he was sorry - I'm not sure he's going to do that - if he said he would step back, that would make us feel comfortable," Eski said. "That would make us feel that we have a say in our future."
She said she had been sympathetic to his years of effort to remove the political influence of military-backed elites, which had sidelined Erdogan's traditional constituency of religiously devout Turks in the past. But now that Erdogan's base is in charge, she said, he has a growing sense of entitlement.
"It's too much about his style, too much about his being the single man in control," Eski said.
Turkey has long been guided by strongman cults. There were centuries of Ottoman imperial rulers; then Mustafa Kemal Ataturk, the national founder who imposed an unrelenting vision of secularism that benefited like-minded elites; and the military, quick to step in when unhappy with civilian leadership.
On Erdogan's watch, the economy has grown, the military has dropped out of politics and diplomats have confidently fanned out across the region. The rapid expansion of Turkish Airlines, the national flagship, symbolises the ambitions of a country that started to rediscover the purported glories of an Ottoman era seen as backward by Ataturk, whose image has been seen on posters and flags at the recent protests.
A product of political Islam, Erdogan reassured supporters of Western-style democracy with an early push for European Union membership. But opponents feel his Government's emphasis on "morality", and measures such as restrictions on alcohol consumption, mask a campaign to tamper with their most intimate decisions in the name of Islam.
The Prime Minister was so confident in the past that national billboards have linked his legacy to plans for the centenary of the national founding in 2023. That lofty vision ties in with his ambition, now in doubt, to switch Turkey to a presidential system of government by referendum, allowing him to run for the post and possibly stay at Turkey's helm for another decade.
"We won't let Erdogan be defeated by anyone. Neither we, nor our voters, would allow that. He is a centenary leader. Our Prime Minister is the one who led the great transformation of Turkey," Yalcin Akdogan, an aide to the Prime Minister, said this week in an interview with HaberTurk television.
Still, Erdogan no longer seems politically untouchable.
"I think people are excited to possibly witness a David and Goliath story," said Arda Batu, vice-chairman of the ARI Movement, a non-governmental group based in Istanbul.
He said, however, that the protesters were unlikely to defeat him even though they had inflicted an "important wound" on the country's leader.
"It seems there is no political party to harness this energy" in the streets, Batu wrote in an email to the Associated Press. "I think that the greatest strength of this political movement, the fact that it was an independent public movement, also points to the greatest weakness in Turkish politics, the lack of strong opposition."
- AP