Profile: Recep Tayyip Erdogan
Recep Tayyip Erdogan is arguably the most successful leader in Turkey's democratic history. After 11 years as prime minister, he will now become his country's first directly-elected president, in what has been until now a largely ceremonial role.
But critics have increasingly accused the 60-year-old leader of polarising the country - by brooking no dissent and harbouring a secret agenda to turn Turkey into a religious society.
He has dominated the political landscape since 2002, steering his Islamist-leaning Justice and Development (AK) Party party to three general election victories.
He won 52% of the vote at the ballot box in the August 2014 presidential poll. Barred from standing for another term as prime minister, he could now serve as president for up to 10 years and says he wants to concentrate greater powers in the post.
He has also brought economic and political stability to a country that not long ago lurched from one crisis to another. During his premiership the economy has grown strongly and Turkey is becoming a manufacturing and export powerhouse.
With Turkey's strictly secularist establishment losing ground to a more overtly Muslim political consciousness, Mr Erdogan has ridden the crest of the wave.
He has also dealt powerfully with his rivals:
- Facing down an army which once stepped into politics - and overthrew elected governments - whenever it felt the need
- Confronting his one-time ally, US-based Islamic cleric Fethullah Gulen, whose supporters he accused of trying to overthrow him
- Taking on protesters who took to the streets across Turkey in June 2013, as resentment against his rule boiled over.
Recep Tayyip Erdogan has denied wanting to impose Islamic values on his countrymen. He has said he is committed to secularism - although he does not think it should be at the expense of Turks who want to express their religious beliefs more openly.
And that includes his wife Emine, who wears a headscarf. The garment has long been outlawed in government offices, schools and universities - but that has not stopped Mrs Erdogan wearing hers to official functions.
Critics also point to his failed bid to criminalise adultery, and his attempts to introduce "alcohol-free zones", as evidence of his alleged Islamist intentions.Brush with the law
Born in 1954, he is the son of a coastguard in the city of Rize on Turkey's Black Sea coast.
Mr Erdogan was 13 when his father decided to move to Istanbul, hoping to give his five children a better upbringing.
As a teenager, he sold lemonade and sesame buns on the streets of Istanbul's rougher districts to earn extra cash.
He attended an Islamic school before obtaining a degree in management from Istanbul's Marmara University - and playing professional football.
While at university, he met Necmettin Erbakan - who went on to become the country's first Islamist prime minister - and entered Turkey's Islamist movement.
Mr Erdogan's first brush with the law came after the military coup of 1980, while he was working for Istanbul's transport authority.
His boss, a retired colonel, told him to shave off his moustache. Mr Erdogan refused and had to quit the job.
His political career in the Welfare Party, as the Islamists' party was known until it was banned in 1998, was developing fast.
In 1994, Mr Erdogan became the mayor of Istanbul.
Even his critics admit that he did a good job, making Istanbul cleaner and greener - although a decision to ban alcohol in city cafes did not please secularists.
He also won admiration from the many who felt he was not corrupt - unlike many other Turkish politicians.
His background and commitment to Islamic values appealed to most of the devout Muslim Turks who were alienated by the state.
But his pro-Islamist sympathies earned him a conviction in 1998 for inciting religious hatred.
He had publicly read an Islamic poem including the lines: "The mosques are our barracks, the domes our helmets, the minarets our bayonets and the faithful our soldiers."
He was sentenced to 10 months in jail, but was freed after four.Combative charisma
Mr Erdogan's AK Party, which was formed by a breakaway group of the Virtue Party, after it was banned by the courts in 2001 because of its "anti-secular" activities, won a landslide election victory in 2002.
Mr Erdogan was leader of the party but was unable to join his colleagues in parliament because he was banned from holding political office.
But a speedy change in the law cleared the way for Mr Erdogan to run for parliament - and within days of his victory he had been named as prime minister.
On the international stage, the prime minister is seen as an awkward, slightly defensive figure - tall, but stiff and unsmiling.
But on his home turf, he comes alive, responding with jokes, sarcasm and even poetry to the crowds of supporters who pack his rallies.
He has the combative charisma that Turks of the teeming cities or small Anatolian towns love.
He has bitterly condemned Israel - previously a strong ally of Turkey - over its treatment of the Palestinians, most recently over the conflict in Gaza. The policy has not only galvanised his Islamic base, but has also made him a hugely popular leader across the Middle East.
He has taken the lead in supporting Syria's opposition in its armed revolt against the government in Damascus, and has been credited with making peace overtures to the Kurdish minority.
But, for all his popularity, he is a polarising figure who, in his second term, has lost the support of many Turkish liberals and intellectuals who once saw him as a democratic pioneer, pushing back the militaristic state that ruled the country for most of the 20th Century.
Despite the widespread popularity he commands across Turkey, the past year has proved particularly difficult for Mr Erdogan.
Street protests, initially against the planned development of Gezi Park in Istanbul, mushroomed in June 2013 into nationwide demonstrations.
His government has become mired in corruption scandals and he has lashed out against social media, vowing to "wipe out" Twitter.
When the government cracked down on the so-called Ergenekon network - which allegedly involved arch-secularists plotting to stir up civil unrest that would justify a military coup - many observers applauded the government for confronting previously untouchable institutions.
But as the number of those put on trial rose to the hundreds, and included many journalists critical of the AKP, Mr Erdogan found himself accused of directing the crackdown for his own ends, and simply attempting to silence dissent.