Prime Minister Recep Tayyip Erdogan on Monday prepared for the challenge of leading Turkey as a strongman president after winning an election in the first round albeit by a narrower-than-expected margin.
He vowed to build a "new Turkey" and reconcile a divided country in triumphant midnight speech before tens of thousands of supporters in Ankara, after taking almost 52 percent of the vote in Sunday's poll.
As premier since 2003, Erdogan has sought to modernise Turkey and take a more assertive position on the global stage but is seen by many as increasingly authoritarian.
Now the country's first ever directly elected president, the Islamic-rooted leader will be inaugurated on August 28 and could serve two five-year terms, staying in power until 2024.
Attention will now turn to who becomes the next prime minister to take the ruling Islamic-rooted Justice and Development Party (AKP) into 2015 legislative elections.
As Erdogan prepares to beef up the powers of the president -- which in recent years has been a largely ceremonial role -- he may have to tread more carefully after a victory that was weaker than expected by his strategists.
"It will have implications for the way he approaches the new presidency, it would have to be more cautious," said Ali Carkoglu, professor at Koc University in Istanbul.
Erdogan is seeking a more US-style executive presidency but this will prove tricky within the limits of the current constitution, and the AKP has vowed to seek a new basic law after the 2015 polls.
Debt ratings agency Fitch said the result "does little to ameliorate the political risk" to Turkey's credit profile.
Sunday's poll was the first direct presidential election in Turkish history -- previously the head of state was chosen by parliament -- and Erdogan has pledged to be a "people's president".
"The Turkish people wrote history yesterday," declared the pro-Erdogan daily Sabah, with a picture of Erdogan delivering a speech from the balcony of AKP headquarters in Ankara with his hand clasped to his heart.
- 'AKP meets on next PM' -
Erdogan won 51.74 percent of the vote, the main opposition challenger Ekmeleddin Ihsanoglu Ihsanoglu 38.46 percent and Kurdish candidate Selahattin Demirtas 9.80 percent, according to results based on a near total vote count.
The AKP's top executive committee was meeting Monday on a new party leader and premier, although a decision will not be made for several days.
The Cumhuriyet daily said Erdogan's failure to win more than 55 percent had shifted the thinking within the AKP about the new premier.
There were now growing voices for outgoing president Abdullah Gul -- seen as a moderate and conciliatory figure -- to take the post.
The other option is Foreign Minister Ahmet Davutoglu, an influential figure but an Erdogan loyalist who would be likely to do his master's bidding.
Turnout was 73.68 percent, a figure that would be considered high in many countries but was sharply down on the 89 percent recorded in Turkey's local elections in March.
Leaders of the secular opposition -- which backed Ihsanoglu -- expressed frustration that many of their voters had stayed at home.
- 'Erdogan had distinct advantage' -
In his victory speech, Erdogan sought to promote a message of reconciliation after a sometimes bitter campaign.
"Today we are closing an era and taking the first step for a new era," he said.
OSCE observers said there has been a "distinct advantage" in the campaign for Erdogan, whose advertising dominated television and billboards.
"The challenges we have noted, particularly the imbalanced media coverage, must be overcome to fully live up to the democratic aspirations of the people," said Vilija Aleknaite-Abramikiene, special coordinator of the mission.
During his first term as president, Erdogan will mark being in power longer than Mustafa Kemal Ataturk, who founded the modern Turkish state in 1923 and is still hailed as the national hero.
Many secular Turks bitterly accuse Erdogan of squandering Ataturk's legacy with a gradual move to Islamise the country and impose one-man rule.
Their anger erupted in deadly 2013 protests sparked by plans to build a shopping mall on the site of Gezi Park in central Istanbul.
There was no reported unrest on election night.
In his victory speech, Erdogan called on opponents who label him a "dictator" to question themselves instead of criticising him.
"We may have different political views, different lifestyles, sects, values, ethnic roots... but we are all sons of this country... each of us are the owner of this state."
In a joint statement, EU council president Herman Van Rompuy and EU Commission head Jose Manuel Barroso called on Erdogan to maintain the presidency's traditional "conciliatory role".