Tayyip Erdogan and his AK Party were heading for victory in Turkey's presidential and parliamentary elections on Sunday, according to preliminary results, as the president sought to extend his 15-year rule.
Although the margin of their lead narrowed steadily as votes were tallied across the nation of 81 million people, an AK Party official said Erdogan was expected to win more than the 50 percent required to avoid a runoff.
An unexpectedly strong showing by the AK Party's alliance partner, the nationalist MHP, could also mean Erdogan secures the parliamentary majority he seeks to govern freely.
However the opposition raised doubts about the accuracy and reliability of the figures released by state-run Anadolu news agency, the sole distributor of the official vote tally.
Erdogan's main presidential rival, Muharrem Ince of the main opposition Republican People's Party (CHP) urged election monitors to remain at polling stations to help ensure against possible election fraud.
Sunday's vote ushers in a powerful new executive presidency long sought by Erdogan and backed by a small majority of Turks in a 2017 referendum. Critics say it will further erode democracy in the NATO member state and entrench one-man rule.
With 80 percent of votes counted in the presidential race, Erdogan had 54 percent, ahead of Ince on 30 percent, broadcasters said.
Results being compiled by the Fair Election Platform, formed by opposition parties, also pointed to Erdogan winning the presidency in the first round with about 53 percent.
In the parliamentary contest, the AK Party had 44 percent and its MHP ally nearly 12 percent, based on 80 percent of votes counted, broadcasters said.
In the opposition camp, the CHP had 22 percent and the pro-Kurdish Peoples' Democratic Party (HDP) 10.3 percent, crucially above the 10 percent threshold needed to enter parliament.
The HDP's presidential candidate, Selahattin Demirtas, has waged his campaign from a prison near the Greek border as he awaits trial on terrorism-related charges, which he denies. He had 7.4 percent, based on more than 80 percent of votes cast.
AK Party supporters clogged a main road in the capital Ankara leading to party headquarters honking horns in celebration. Erdogan was expected to address supporters from a balcony of the headquarters building later in the evening.
Election turnout nationwide was very high at around 87 percent for both contests, the state broadcaster said.
Opposition parties and NGOs deployed up to half a million monitors at ballot boxes to ward against possible electoral fraud. They have said election law changes and fraud allegations in the 2017 referendum raise fears about the fairness of Sunday's elections.
Erdogan said there had been no serious voting violations.
"Turkey is staging a democratic revolution," he told reporters after casting his own vote in Istanbul on Sunday.
"With the presidential system, Turkey is seriously raising the bar, rising above the level of contemporary civilisations."
Erdogan, the most popular but also divisive leader in modern Turkish history, argues the new powers will better enable him to tackle the nation's economic problems - the lira has lost 20 percent against the dollar this year - and crush Kurdish rebels in southeast Turkey and in neighbouring Iraq and Syria.
Investors would welcome the prospect of a stable working relationship between the president and the new parliament, although they also have concerns about Erdogan's recent comments suggesting he wants to take greater control of monetary policy.
Erdogan has declared himself an "enemy of interest rates", raising fears he will pressure the central bank to cut borrowing costs after the election despite double-digit inflation.
He brought forward the elections from November 2019, but he reckoned without Ince, a former physics teacher and veteran CHP lawmaker, whose feisty performance at campaign rallies has galvanized Turkey's long-demoralised and divided opposition.
Turkey held Sunday's elections under a state of emergency declared after a failed military coup in July 2016. This state restricts some freedoms and allows the government to bypass parliament with decrees. Both Erdogan and Ince have said they will lift the state of emergency as president.
Erdogan blamed the coup on his former ally, U.S.-based Muslim cleric Fethullah Gulen, and has waged a sweeping crackdown on his followers in Turkey, detaining some 160,000 people, according to the United Nations.
The president's critics, including the European Union which Turkey still nominally aspires to join, say Erdogan has used the crackdown to stifle dissent.
Erdogan says his tough measures are needed to safeguard national security.