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.
Erdogan said 25 million people had supported the proposal, which will replace Turkey's parliamentary system with an all-powerful presidency and abolish the office of prime minister, giving the Yes camp 51.5% 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.
Under the changes, most of which will only come into effect after the next elections due in 2019, the president will appoint the cabinet and an undefined number of vice-presidents, and be able to select and remove senior civil servants without parliamentary approval.
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.
The party earlier said it would demand a recount of up to 60% 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.
Internationally the reaction was of concern. The European Commission, the executive body of the European Union, said the close result meant that Ankara should seek the broadest national consensus in implementing the vote.
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.
The package of 18 amendments would give the president the authority to draft the budget, declare a state of emergency and issue decrees overseeing ministries without parliamentary approval.