Turkish President Recep Tayyip Erdogan has said his country could hold a referendum on its long-stalled bid for membership of the European Union.

"For 54 years, what did they make us do at the EU's door? Wait!" Mr Erdogan told supporters outside the presidential palace in Ankara, referring to Turkey's long-standing membership bid.

He hit back at threats by EU leaders to freeze accession talks, adding: "We will sit down and talk, and we can hold a referendum for that (EU bid) too!"

The announcement comes after world leaders gave a mixed reaction to the Turkish referendum which has given increased powers to Mr Erdogan.

Russia said the vote should be respected.

German Chancellor Angela Merkel said the close result showed how deeply divided Turkish society was and that meant a big responsibility for the Turkish leadership and for President Erdogan personally.

White House spokesman Sean Spicer said the United States would not comment on the vote until an international monitoring report is published.

Separately, the European Commission called on Turkey to seek a national consensus following the referendum result.

Turkey's election board said the 'Yes' campaign secured victory with just over 51% of the vote.

The European Commission has called on President Erdogan to respect the closeness of the result and the far-reaching implications of the constitutional amendments.

Opposition parties have argued that the changes, which come into effect after the 2019 presidential election, give too much power to the office.

They have also demanded a recount claiming that there had been voting irregularities. 

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.

Mr 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 Mr Erdogan needed to change course, noting the result was very tight. "If Erdogan persists, EU should stop accession talks," he said.

After the vote, Mr 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.

The German foreign minister has also warned Turkey against further distancing itself from the EU by making such a move.

Sigmar Gabriel said that if Turkey were to bring back the death penalty, the move would be "synonymous with the end of the European dream" and mark the end of decades of negotiations to enter the European Union.

It is in Turkey's "own interest" not to distance itself further from Europe, Mr Gabriel said in an interview in the Bild mass circulation daily to be published tomorrow. 

Further deterioration in relations with the European Union could also jeopardise 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. Mr 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.

Opponents say it is a step towards greater authoritarianism.

Mr Erdogan and the AK Party enjoyed a disproportionate share of media coverage in the build-up to the vote while the leaders of the pro-Kurdish People's Democratic Party (HDP), which opposes the changes, have been in jail for months.

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.

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.