By Agence France-Presse
The sweeping constitutional changes approved in the vote create a presidential system that will grant Erdogan more power than any leader since modern Turkey's founder Mustafa Kemal Ataturk and his successor Ismet Inonu.
The result could also have even wider implications for Turkey which joined NATO in 1952 and for the last half-century has set its sights on joining the European Union.
The 'Yes' campaign won 51.4 percent of the vote against 48.6 percent for 'No', the election commission said in figures quoted by state news agency Anadolu, in a count based on 99.5 percent of the ballot boxes.
As huge crowds of flag-waving supporters celebrated on the streets, Erdogan praised Turkey for taking a "historic decision".
"With the people, we have realised the most important reform in our history," he added.
Supreme Election Board chief Sadi Guven confirmed that the 'Yes' camp had emerged victorious, but the opposition has vowed to challenge the outcome.
'New page opened'
The referendum was held under a state of emergency that has seen 47,000 people arrested in an unprecedented crackdown after the failed military putsch against Erdogan in July last year.
In a nail-biting end to a frenetic campaign, the 'No' share of the vote climbed as more ballots were counted, after lagging well behind in the early count, but failed to overtake the 'Yes'.
"This is a decision made by the people. In our democracy's history, a new page has opened," said Prime Minister Binali Yildirim, whose job will disappear under the constitutional changes.