President Tayyip Erdogan declared victory in a referendum on Sunday to grant him sweeping powers in the biggest overhaul of modern Turkish politics, but opponents said the vote was marred by irregularities and they would challenge its result.
Turkey's mainly Kurdish southeast and its three main cities, including the capital Ankara and the largest city Istanbul, looked set to vote "No" after a bitter and divisive campaign.
Erdogan said 25 million people had supported the proposal to replace Turkey's parliamentary system with an all-powerful presidency, giving the "Yes" camp 51.5 percent of the vote.
That appeared short of the decisive victory for which he and the ruling AK Party had aggressively campaigned. Nevertheless, thousands of flag-waving supporters rallied in Ankara and Istanbul in celebration.
"For the first time in the history of the Republic, we are changing our ruling system through civil politics," Erdogan said, referring to the military coups which marred Turkish politics for decades. "That is why it is very significant."
Erdogan himself survived a failed coup attempt last July, responding with a crackdown that has seen 47,000 people detained and 120,000 sacked or suspended from their jobs.
In Ankara, where Prime Minister Binali Yildirim addressed cheering supporters, convoys of cars honking horns clogged a main avenue as they headed towards the AK Party's headquarters, their passengers waving flags from the windows.
But the head of the main opposition Republican People's Party (CHP), Kemal Kilicdaroglu, said the legitimacy of the referendum was open to question and those who supported a "Yes" vote may have gone beyond the boundaries of the law.
The party earlier said it would demand a recount of up to 60 percent of the votes after Turkey's High Electoral Board (YSK) announced it would count ballots which had not been stamped by its officials as valid unless they could be proved fraudulent.
Kilicdaroglu has accused Erdogan of seeking a "one-man regime", and said the proposed changes would put the country in danger.
In some affluent neighborhoods in Istanbul, people took to the streets in protest while others banged pots and pans at home - a sign of dissent that was widespread during anti-Erdogan protests in 2013.
Turkey's lira firmed to 3.65 to the dollar in Asian trade following the referendum, from 3.72 on Friday.
European politicians, however, who have had increasingly strained relations with Turkey, expressed concern.
Relations hit a low during the referendum campaign when EU countries, including Germany and the Netherlands, barred Turkish ministers from holding rallies in support of the changes.
Erdogan called the moves "Nazi acts" and said Turkey could reconsider ties with the European Union after many years of seeking EU membership.
Former Belgian prime minister Guy Verhofstadt, who heads the liberal group of MEPs in the European Parliament, said Erdogan needed to change course, noting the result was very tight. "If Erdogan persists, EU should stop accession talks," he said.
Manfred Weber, leader of the center-right grouping tweeted: "No matter the result: with his referendum Pres. Erdogan is splitting his country."
After the vote Erdogan repeated his intention to review Turkey's suspension of the death penalty, a step which would almost certainly spell the end of Ankara's EU accession process.
"I will immediately discuss this issue with Yildirim and (nationalist party head) Devlet Bahceli," Erdogan said. If presented with a proposal, he would approve it, the president said, adding he could also put it to another referendum.
Further deterioration in relations with the European Union could also jeopardize last year's deal under which Turkey has curbed the flow of migrants - mainly refugees from wars in Syria and Iraq - into the bloc.
The referendum has bitterly divided the nation. Erdogan and his supporters say the changes are needed to amend the current constitution, written by generals following a 1980 military coup, confront the security and political challenges Turkey faces, and avoid the fragile coalition governments of the past.
"This is our opportunity to take back control of our country," said self-employed Bayram Seker, 42, after voting "Yes" in Istanbul.
"I don't think one-man rule is such a scary thing. Turkey has been ruled in the past by one man," he said, referring to modern Turkey's founder Mustafa Kemal Ataturk.
Opponents say it is a step towards greater authoritarianism. Erdogan and the AK Party enjoyed a disproportionate share of media coverage in the buildup to the vote, while the leaders of the pro-Kurdish People's Democratic Party (HDP) have been in jail for months.
"I voted 'No' because I don't want this whole country and its legislative, executive and judiciary ruled by one man. This would not make Turkey stronger or better as they claim. This would weaken our democracy," said Hamit Yaz, 34, a ship's captain, after voting in Istanbul.
Proponents of the reform argue that it would end the current "two-headed system" in which both the president and parliament are directly elected, a situation they argue could lead to deadlock. Until 2014, presidents were chosen by parliament.
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 and clear leadership to combat terrorism.
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.
More from Newsweek