Turkey's president Tayyip Erdogan has claimed victory in a vote that will greatly expand his powers.
The vote will replace Turkey's parliamentary democracy with an all-powerful presidency and may see Mr Erdogan in office until at least 2029.
The "yes" vote had about 51.3 percent compared to 48.7 percent for the "no" vote with nearly 99 percent of the vote counted in results carried by the state-run Anadolu news agency on Sunday (local time).
Addressing thousands of flag-waving supporters on Sunday night, Prime Minister Binali Yildirim said the "unofficial' final result is 'yes"' for the constitutional referendum.
Despite the overall "Yes" vote, Turkey's three largest cities and the mainly Kurdish southeast look set to vote "No".
The outcome will shape Turkey's strained relations with the European Union. The NATO member state has curbed the flow of refugees from wars in Syria and Iraq into the bloc, but Erdogan says he may review the deal after the vote.
In Turkey's three biggest cities - Istanbul, Izmir and the capital Ankara - the "No" camp appeared set to prevail narrowly, according to Turkish television stations.
Speaking to reporters in Ankara, Deputy Prime Minister Veysi Kaynak said the "Yes" camp had not won as many votes as expected.
The "Yes" percentage of the vote - which stood at 63 per cent after around one quarter had been opened - eased as the count came further west towards Istanbul and the Aegean coast.
Mr Erdogan and his supporters say the changes are needed to amend the current constitution, written by generals following a 1980 military coup.
The government says Turkey, faced with conflict to the south in Syria and Iraq, and a security threat from Islamic State and PKK militants, needs strong leadership to combat terrorism.
Opponents say it is a step towards greater authoritarianism in a country where some 47,000 people have been jailed pending trial and 120,000 sacked or suspended from their jobs in a crackdown following a failed coup last July.
Mr Erdogan and the AK Party enjoyed a disproportionate share of media coverage in the buildup to the vote, overshadowing the secular main opposition CHP and the pro-Kurdish Peoples' Democratic Party (HDP).
CHP leader Kemal Kilicdaroglu has accused Erdogan of seeking a "one-man regime", and said the proposed changes would put the country in danger.
The package of 18 amendments would abolish the office of prime minister and give the president the authority to draft the budget, declare a state of emergency and issue decrees overseeing ministries without parliamentary approval.