Turkish Prime Minister Recep Tayyip Erdogan, who is favorite to win Sunday's presidential election, climbed from a humble youth in Istanbul to become one of the most significant but controversial leaders anywhere in the Islamic world.
Erdogan, who has served as premier since 2003, is lauded by his supporters as the new "Sultan" who modernized Turkey and delivered power back to the people from the secular and military elite.
An increasingly divisive figure, he is hated by large numbers of secular Turks who see him as an autocrat who slowly but surely wants to Islamize the country.
But there is no doubt that Erdogan has his eye on history and wants to be ranked alongside Turkey's post-Ottoman founding father Mustafa Kemal Ataturk as the great transformative figure in its modern history.
If Erdogan wins Sunday's presidential elections, his extraordinary journey to the very top of Turkish politics will be complete.
Should he serve two five year terms, he will be ruling Turkey in 2023 when the country celebrates the 100th anniversary of its founding by Ataturk.
His aim is to transform Turkey into both a modern European state and Islamic power, with breathtakingly ambitious projects including a brand new high speed train network for the entire country, a tunnel beneath the Bosphorus and a new canal in Istanbul for ships.
Yet for his foes, Erdogan is a throwback to the autocratic excesses of the Ottoman empire who risks destroying Ataturk's secular legacy and the country's dream of one day joining the EU.
Soner Cagaptay, director of the Turkish Research Program at The Washington Institute, said half of the country voted for Erdogan in support of both his record of economic growth and his strongman tactics but another half felt more alienated.
"It is going to be hard for him to bridge the divide," he said.
The son of a coastguard officer in Istanbul's harborside neighborhood of Kasimpasa, Erdogan who came from humble origins, went to religion-orientated imam-hatip school.
He took a degree in business administration and even played semi-professional football for an Istanbul club.
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 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 has easily won every election since then.
Turkey showed stellar growth rates that were the envy of other emerging markets and adopted an increasingly confident position on the international stage.
But the leader has faced the worst crisis of his rule as prime minister over the past year, weathering massive anti-government protests, an explosive corruption scandal and a stuttering economy.
Erdogan has come out fighting, angrily vowing to "liquidate" his foes and ridiculing all political opponents in mass rallies.
His number one enemy is the Pennsylvania-based cleric Fethullah Gulen, an estranged former ally who the premier accuses of creating a parallel state aimed at toppling his government.
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 Islamize the staunchly secular society.