The 'Yes' campaign had won 52.1 percent of the vote while the 'No' campaign had mustered 47.9 percent, the election commission said in figures quoted by state news agency Anadolu, in an initial count based on 92 percent of the ballot boxes.
In a nail-biting end to a frenetic campaign, the 'No' share of the vote was climbing as more ballots were counted, after lagging well behind in the early count.
More than 55.3 million Turks were eligible to cast ballots on sweeping changes to the president's role which, if approved, would grant Erdogan more power than any leader since modern Turkey's founder Mustafa Kemal Ataturk and his successor Ismet Inonu.
Voting in Istanbul with his family, Erdogan predicted that "our people would walk to the future" by making the right choice.
Prime Minister Binali Yildirim said: "Whatever choice comes out on top, our nation will make the most beautiful decision."
Yildirim was later due to address supporters from the headquarters of the Justice and Development Party (AKP) in Ankara while Erdogan was watching the results in Istanbul.
The Aegean and Mediterranean coastal regions and Kurdish-dominated southeast had backed the 'No' camp but the 'Yes' vote had held up strongly in Erdogan's Anatolian heartland.
But in a possible major disappointment for the president, the 'No' vote was just ahead in his hometown of Istanbul with 50.5 percent and also just ahead in the capital Ankara.
The opposition has cried foul that the referendum has been conducted on unfair terms, with 'Yes' posters ubiquitous on the streets and opposition voices squeezed from the media.
The poll is also taking place under a state of emergency that has seen 47,000 people arrested in an unprecedented crackdown after the failed putsch of July last year.
The co-leaders of Turkey's second largest opposition party, the pro-Kurdish Peoples Democratic Party (HDP) Selahattin Demirtas and Figen Yuksekdag, have been jailed on charges of links to Kurdish militants in what the party says is a deliberate move to eliminate them from the campaign.
Closely watched on Monday will be the initial assessment of the international observer mission of the OSCE Office for Democratic Institutions and Human Rights (ODIHR) and the Parliamentary Assembly of the Council of Europe (PACE).
If passed, the new presidential system would dispense with the office of prime minister and centralise the entire executive bureaucracy under the president, giving Erdogan the direct power to appoint ministers.
The system would come into force after the elections in November 2019. Erdogan, who became president in 2014 after serving as premier from 2003, could then seek two more five- year terms.
Disclaimer: No Business Standard Journalist was involved in creation of this content
