Turkey's main opposition party has called on the country's electoral board to cancel Sunday's referendum that approved a proposal to grant sweeping powers to the nation's president.

Bulent Tezcan, deputy chairman of the Republican People's Party, which is known by its Turkish acronym CHP, cited irregularities in the conduct of the vote.

He said there was "only one way to end the discussions about the vote's legitimacy and to put the people at ease, and that is for the supreme electoral board to cancel the vote".

The board's unprecedented decision to accept as valid ballots that did not bear the official stamp has led to outrage among opposition parties.

Mr Tezcan said it was not possible for authorities to determine how many ballot papers may have been irregularly cast.

The party has said it will contest the result of the referendum.

Mr Tezcan told reporters in Ankara that counting of the ballots initially took place in secret in several polling stations. He said observers were not allowed to watch the proceedings for at least one-and-a-half hours until the party's complaint was accepted.

On Sunday Turkey's president, Recep Tayyip Erdogan, won the historic referendum that will greatly expand the powers of his office.

With nearly all ballots counted, the "yes" vote stood at 51.41%, while the "no" vote was 48.59%, according to the state-run Anadolu Agency.

The head of Turkey's electoral board confirmed the "yes" victory and said final results would be declared in 11-12 days.

Although the margin fell short of the sweeping victory Mr Erdogan had sought in the landmark referendum, it could nevertheless cement his hold on power in Turkey.

The result is expected to have a huge effect on the country's long-term political future and its international relations.

The 18 constitutional amendments that will come into effect after the next election, scheduled for 2019, will abolish the office of the prime minister and hand sweeping executive powers to the president.

Mr Erdogan, who first came to power in 2003 as prime minister, had argued a "Turkish-style" presidential system would bring stability and prosperity to the country.

Turkey was rocked by a failed coup last year that left more than 200 people dead, and has been hit by a series of devastating attacks by the Islamic State group and Kurdish militants.

In his first remarks from Istanbul after the vote count showed the amendments winning approval, Mr Erdogan struck a conciliatory tone, thanking all voters no matter how they cast their ballots and calling the referendum a "historic decision".

He said: "April 16 is the victory of all who said 'yes' or 'no,' of the whole 80 million, of the whole of Turkey."

But he quickly reverted to a more abrasive style when addressing thousands of flag-waving supporters in Istanbul.

"There are those who are belittling the result. They shouldn't try, it will be in vain," he said. "It's too late now."

Responding to chants from the crowd to reinstate the death penalty, Mr Erdogan said he would take up the issue with the country's political leaders, adding that the question could be put to another referendum.

He also took a dig at international critics. During the referendum campaign, Ankara's relations soured with some European countries, notably Germany and the Netherlands.

Mr Erdogan branded officials in the two nations as Nazis for not allowing his ministers to campaign for the expatriate vote there.

"We want other countries and organisations to show respect to the decision of our people. We expect countries that we accept as our allies to show more sensitivity to our fight against terrorism," he said.

Opponents had argued the constitutional changes would give too much power to a man who they say has shown increasingly autocratic tendencies.

Given the contested outcome, Fadi Hakura, Turkey specialist at the London-based think tank Chatham House, described Mr Erdogan's win as a "pyrrhic victory that comes at a huge political cost".

He said: "The result will depend on how far the opposition will take their claim of irregularity in the voting, and what the international reaction will be."

Initial reaction from abroad was cautious. Senior EU officials - EU Commission chief Jean-Claude Juncker, EU foreign policy chief Federica Mogherini and enlargement commissioner Johannes Hahn - said they "take note of the reported results" and were awaiting a report from international election observers.

The referendum campaign was highly divisive and heavily one-sided, with the "yes" side dominating the airwaves and billboards. Supporters of the "no" vote have complained of intimidation, including beatings, detentions and threats.

More than 55 million people were registered to vote, while another 1.3 million expatriates cast ballots abroad. The ballots themselves did not include the referendum question - it was assumed to be understood.

The changes will allow the president to appoint ministers, senior government officials and half the members of Turkey's highest judicial body, as well as to issue decrees and declare states of emergency.

They set a limit of two five-year terms for presidents and also allow the president to remain at the helm of a political party.

Opponents fear the changes will lead to autocratic one-man rule, ensuring that 63-year-old Mr Erdogan, who has been accused of repressing rights and freedoms, could govern until 2029 with few checks and balances.

In Istanbul, hundreds of demonstrators opposed to the amendments marched in a central neighbourhood late on Sunday, clanging pots and pans and chanting: "This is just the beginning, the struggle will continue."

Germany called on the Turkish government to engage in a "respectful dialogue with all political and civilian forces of the country" after "the narrow outcome of the referendum showed how deeply Turkish society is divided".

German Chancellor Angela Merkel and foreign minister Sigmar Gabriel said in a joint statement that the German government respects the Turkish people's right to decide over their constitution, but they also said Mr Erdogan carries a "big responsibility" for the country's next steps.

They pointed out that the Organisation for Security and Cooperation in Europe had already last week expressed doubt about whether the conditions for the vote were fair.

Later, an observer mission that had been monitoring the referendum campaign and vote on expanding presidential powers said the procedures used "fell short" of international standards.

Tana de Zuleta, of the OSCE, said that a Turkish electoral board decision to allow as valid ballots that did not bear official stamps undermined important safeguards against fraud.

The monitoring group described a series of irregularities in the referendum, including a skewed pre-vote campaign in favour of the "yes" vote, intimidation of the "no" campaign and the fact that the referendum question was not listed on the ballot.