ISTANBUL (AP) - With 97 percent of the ballots counted in Turkey's historic referendum, those who back constitutional changes greatly expanding President Recep Tayyip Erdogan's powers had a narrow lead Sunday night, the official Anadolu news agency said.
The results from Sunday's vote are expected to have a huge effect on Turkey's long-term political future and on its relations with the European Union and the world.
Anadolu said 51.4 percent voted "yes" and backed the constitutional changes to replace Turkey's parliamentary system with a presidential vote, with 48.6 percent voting "no" against them.
More than 55 million people in this country of about 80 million were registered to vote and more than 1.3 million Turkish voters cast their ballots abroad.
Officials said Erdogan was already thanking allies and supporters for the passage of the constitutional changes as the vote neared its end. Erdogan supporters were celebrating with fireworks in Istanbul as the president said he is "grateful" to the people who "reflected their will.'
However, the vice-chairman of Turkey's main opposition party said the party will contest 37 percent of the votes counted.
The opposition criticized the decision of the country's elections board to accept as valid ballot papers that don't have its official stamp. Republican People's Party deputy chairman Bulent Tezcan told reporters Sunday that the decision leaves the results of the constitutional referendum "faced with a serious legitimacy problem."
Turkey's Supreme Election Board announced the unprecedented move after many voters casting their votes in the country's historic referendum complained that they were given ballot papers without the official stamp.
If the "yes" vote prevails, the 18 constitutional changes will replace Turkey's parliamentary system of government with a presidential one, abolishing the office of the prime minister and granting sweeping executive powers to the president.
Erdogan and his supporters say the "Turkish-style" presidential system would bring stability and prosperity in a country rattled by last year's coup attempt and a series of devastating attacks by the Islamic State group and Kurdish militants.
But opponents fear the changes will lead to autocratic one-man rule, ensuring that the 63-year-old Erdogan, who has been accused of repressing rights and freedoms, could govern until 2029 with few checks and balances.
Erdogan described the referendum as an opportunity for "change and transformation" as he voted Sunday in Istanbul, where black-clad bodyguards with automatic weapons stood guard outside the polling station.
"We need to make a decision that is beyond the ordinary," Erdogan said.
Kemal Kilicdaroglu, the leader of Turkey's main opposition party and top "no" campaigner, called the referendum a vote on Turkey's future.
"We hope the results will be good and together we can have the opportunity to discuss Turkey's other fundamental problems," he said.
The ballots themselves did not include the referendum question - it was assumed to be understood. Voters used an official stamp to select between "yes" and "no."
At one Istanbul polling station, eager voters lined up outside before it opened at 8 a.m.
"We are here early to say 'no' for our country, for our children and grandchildren," said retired tax officer Murtaza Ali Turgut.
His wife Zeynep agreed, saying: "I was going to come sleep here last night to vote at first light."
Istanbul resident Husnu Yahsi, 61, also said he was voting "no".
"I don't want to get on a bus with no brake system. A one-man system is like that," he said.
In another Istanbul neighborhood, a "yes" voter expressed full support for Erdogan.
"Yes, yes, yes! Our leader is the gift of God to us," said Mualla Sengul. "We will always support him. He's governing so well."
Anadolu reported that military helicopters flew ballots and elections officers to some districts of the southeastern predominantly Kurdish region of Diyarbakir due to security reasons.
The proposed changes would grant the president powers to appoint ministers, senior government officials and half the members of Turkey's highest judicial body, as well as issue decrees and declare states of emergency. It sets a limit of two five-year terms for presidents and also allows the president to remain at the helm of a political party. The changes would come into effect with the next general election, scheduled for 2019.
Erdogan first came to power in 2003 as prime minister and served in that role until becoming Turkey's first directly elected president in 2014. He has long sought to expand the powers of the president.
The campaign has been highly divisive and heavily one-sided, with the "yes" side dominating the airwaves and billboards across the country. Supporters of the "no" vote have complained of intimidation, recording more than 100 incidents of obstruction to its campaign efforts, including beatings, detentions and threats.
The vote comes as Turkey has been buffeted by problems. Erdogan survived a coup attempt last July, which he has blamed on his former ally and current nemesis Fethullah Gulen, an Islamic cleric living in the United States. Gulen has denied knowledge of the coup attempt.
Still, a widespread government crackdown has targeted followers of Gulen and other government opponents, branding them terrorists and a state of emergency imposed after the coup attempt remains in effect.
Roughly 100,000 people - including judges, teachers, academics, doctors, journalists, military officials and police - have lost their jobs in the government crackdown, and more than 40,000 have been arrested. Hundreds of media outlets and non-governmental organizations have been shut down.
Turkey has also suffered renewed violence between Kurdish militants and security forces in the country's volatile southeast, as well as a string of bombings, some attributed to the Islamic State group, which is active across the border in Syria.
The war in Syria has led to some 3 million refugees crossing the border into Turkey. Turkey has sent troops into Syria to help opposition Syrian forces clear a border area from the threat posed by Islamic State militants.
Meanwhile, Turkey's relations with Europe have been increasingly tense, particularly after Erdogan branded Germany and the Netherlands as Nazis for not allowing Turkish ministers to campaign for the "yes" vote among expatriate Turks.
Suzan Fraser in Ankara, Bram Janssen in Istanbul and Mucahit Ceylan in Diyarbakir contributed to this report.