Erdogan looks to the past as he vows to build a new Turkey
Prime minister heads into presidential poll comparing himself to secular reformer Ataturk, but critics say he has a hidden Islamist agenda
Turkey's Prime Minister Recep Tayyip Erdogan hopes to secure a place alongside Mustafa Kemal Ataturk in the pantheon of great and transformative Turkish leaders, but critics accuse him of undermining the legacy of the founder of the modern republic.
Erdogan - the favourite to win Sunday's presidential election - repeatedly pays tribute to Ataturk, who founded the modern Turkish state in 1923. Ataturk forged a system of government based on a strict separation between mosque and state.
Yet the values espoused by Erdogan, a pious Muslim who does not drink or smoke and whose wife wears the Islamic headscarf, seem for many to sit at odds with Ataturk, whose aura still dominates Turkish political life and whose image is on the wall of offices up and down the country.
A sea of people packed tightly together in the humid temperatures in Istanbul to greet Erdogan at his last major rally on Sunday.
"God willing, it is my will to be buried in this city. I am here not as the prime minister, not as the presidential candidate, but as Erdogan from Kasimpasa," he said, referring to the run-down district of Istanbul where he spent his youth.
Erdogan sees himself a successor to Ataturk - as well as the most successful Ottoman sultans - in that he has embarked on a drive to modernise the country straddling Europe and Asia, in particular with a hugely ambitious infrastructure programme.
Prime minister since 2003, Erdogan has confronted Turkey's coup-filled past head-on and succeeded for the first time in curbing the influence of the military, which had repeatedly stepped in over the years to prevent religious influences entering with government.
"Hundreds, thousands, millions of heroes from Alparslan to Fatih [the Conqueror], from Kanuni [Suleyman the Magnificent] to Yavuz Selim, from Abdulhamid to Mustafa Kemal wrote the history of this nation, not the coup-makers," he said last year, reciting the names of Turkish sultans going back to the Selcuk period in the 11th century.
Erdogan - whose main presidential rival is the former head of the Organisation of Islamic Cooperation, Ekmeleddin Ihsanoglu - is clearly eyeing a legacy that will cement his place in history by building Turkey's first national high-speed train network, a third bridge over the Bosphorus and a gigantic third airport in Istanbul.
These projects are part of a drive named Target 2023, the year when Turkey marks the 100th anniversary of its founding by Ataturk. Erdogan apparently has every intention of still being in power when that date comes.
Faruk Logoglu, deputy head of the secular opposition Republican People's Party - founded by Ataturk - said a long-serving leader like Erdogan would find his place in history but leave behind a chequered legacy.
He predicted that if elected, Erdogan's "assertive" presidency would steer Turkey into uncharted waters at home and abroad.
"Religion-oriented policies will find more room, democracy will decline, freedoms will stand back," he said.
"Erdogan has been longing for the caliphate somewhere in his heart, even though it's not declared. He will use the presidency as a tool to become the leader of the Muslim world."
The premier was shaken when the secular urban middle class held mass protests last year, underlining the extent to which they feel alienated by his rule.
Unrepentant, Erdogan vowed his party would not retreat from the path of modernity promoted by Ataturk and said there would be a "new Turkey" by 2023.
But controversial policies like a ban on overnight sales of alcohol have resurrected fears that Erdogan's ruling AK party, which has roots in political Islam, has a hidden agenda to Islamise the country and destroy Ataturk's legacy.