ANKARA, Turkey (AP) -- Turkey's presidential elections appeared headed for a runoff Monday, with President Recep Tayyip Erdogan pulling ahead of his chief challenger, but falling short of an outright victory that would extend his increasingly authoritarian rule into a third decade.
The vote was being closely watched to see if the strategically located NATO country -- which has a coast on the Black Sea to the north, and neighbors Iran, Iraq and Syria to the south -- remains under the president's firm grip or can embark on a more democratic course envisioned by his main rival, Kemal Kilicdaroglu.
While Erdogan has governed for 20 years, opinion polls had suggested that run could be coming to end amid economic turmoil, a cost-of-living crisis and criticism over the government's response to a February earthquake that killed more than 50,000 people. Western nations and foreign investors were particularly interested in the outcome because of Erdogan's unorthodox leadership of the economy and often mercurial but successful efforts to put Turkey at the center of international negotiations, including in Ukraine.
With 99.4% of the domestic votes and 84% of the overseas votes counted, Erdogan had 49.4% of the votes, with Kilicdaroglu, garnering 45%, Ahmet Yener, the head of the Supreme Electoral Board, told reporters. A third candidate, nationalist politician Sinan Ogan received 5.2%.
Erdogan, 69, told supporters in the early hours of Monday that he could still win. He said, however, that he would respect the nation's decision if the race went to a runoff on May 28 -- a vote that may favor him since his alliance looked set to retain its majority in parliament.
Opinion polls in the runup to Sunday's vote had given Kilicdaroglu, the joint candidate of a six-party opposition alliance, a slight lead over Erdogan, who has governed Turkey as either prime minister or president since 2003.
Kilicdaroglu sounded hopeful for a second-round victory.
"We will absolutely win the second round ... and bring democracy" said Kilicdaroglu, 74, maintaining that Erdogan had lost the trust of a nation now demanding change.
Ogan has not said whom he would endorse if the elections go to a second round. He is believed to have received support from electors wanting change after two decades under Erdogan but unconvinced by the Kilicdaroglu-led six party alliance's ability to govern.
The election results showed that the alliance led by Erdogan's ruling Justice and Development Party looked like it would keep its majority in the 600-seat parliament, although the assembly has lost much of its legislative power after a referendum to change the country's system of governance to an executive presidency narrowly passed in 2017.
Anadolu news agency said Erdogan's ruling party alliance was hovering around 49.3%, while Kilicdaroglu's Nation Alliance had around 35.2% and support for a pro-Kurdish party stood above 10%.
The fact that Erdogan appears to have held on to his majority increases his chances of winning a second-round vote, with more voters likely to support Erdogan to avoid a split government.
As in previous years, Erdogan led a highly divisive campaign. He portrayed Kilicdaroglu, who had received the backing of the country's pro-Kurdish party, of colluding with "terrorists" and of supporting what he called "deviant" LGBTQ rights. In a bid to woo voters hit hard by inflation, he increased wages and pensions and subsidized electricity and gas bills, while showcasing Turkey's homegrown defense industry and infrastructure projects.
Kilicdaroglu, for his part, campaigned on promises to reverse crackdowns on free speech and other forms of democratic backsliding, as well as to repair an economy battered by high inflation and currency devaluation.
"That the election results have not been finalized doesn't change the fact that the nation has chosen us," Erdogan said.
Results reported by the state-run Anadolu Agency showed Erdogan's party dominating in the earthquake-hit region, winning 10 out of 11 provinces despite criticism of a slow and anemic response by Erdogan's government to the 7.8-magnitude earthquake. Lax implementation of building codes is thought to have exacerbated the casualties and devastation in the 11 southern provinces.
Turkey's conservative heartland overwhelmingly voted for the ruling party, with Kilicdaroglu's main opposition winning most of the coastal provinces in the west and south. The pro-Kurdish Green Left Party, YSP, won the predominantly Kurdish provinces in the southeast.
More than 64 million people, including the overseas voters, were eligible to vote and nearly 89% voted. This year marks 100 years since Turkey's establishment as a republic -- a modern, secular state born on the ashes of the Ottoman Empire.
Voter turnout in Turkey is traditionally strong, despite the government suppressing freedom of expression and assembly over the years and especially since a 2016 coup attempt. Erdogan blamed the failed coup on followers of a former ally, cleric Fethullah Gulen, and initiated a large-scale crackdown on civil servants with alleged links to Gulen and on pro-Kurdish politicians.
Erdogan, along with the United Nations, helped mediate a deal with Ukraine and Russia that allowed Ukrainian grain to reach the rest of the world from Black Sea ports despite Russia's war in Ukraine. The agreement, which is implemented by a center based in Istanbul, is set to expire in days, and Turkey hosted talks last week to keep it alive.
But Erdogan also has held up Sweden's quest to join NATO, contending that nation has been too lenient on followers of the U.S.-based cleric and members of pro-Kurdish groups that Turkey considers national security threats.
Critics maintain the president's heavy-handed style is responsible for a painful cost-of-living crisis. The latest official statistics put inflation at about 44%, down from a high of around 86%. The price of vegetables became a campaign issue for the opposition, which used an onion as a symbol.
In contrast with mainstream economic thinking, Erdogan contends that high interest rates fuel inflation, and he pressured the Central Bank of the Republic of Turkey to lower its main rate multiple times.