The secular, main opposition alliance, the Republican People's Party, or CHP had 30 percent.
According to Galip Dalay, a visiting fellow at the University of Oxford, the results are not a mathematical loss for the AK Party, but they still would not be taken lightly by Erdogan's bloc.
Nationwide, AKP remains the largest party with 45 per cent of the vote, according to partial results released by Anadolu state news agency with 91 per cent of ballot boxes opened.
"This gives the governing party and President Erdogan a window of opportunity to undertake economic reforms, political reforms if they wish, fix Turkey's relations with foreign countries", he said.
The ruling AK Party, which ran as part of the People's Alliance, suffered setback in Sunday's local elections, which were held against the backdrop of Turkey's first recession in a decade while its lira currency lost as much as 40 percent of its value against the USA dollar a year ago.
New Progress Made on Details of Text to End Trade War
However, Trump postponed another tariff hike March 1, in a move that may have reduced USA leverage in seeking Chinese concessions. In Washington , White House economic adviser Larry Kudlow said Thursday the talks could last weeks or even months if necessary.
UK minister warns of prospect of United Ireland in no-deal Brexit
A jogger gives the middle finger to a pro-Brexit demonstrator outside the Houses of Parliament in London on March 29, 2019.
Fearing Brexit, protesters gather along Irish border
He added: "What's needed now is a long extension to the Article 50 period for all parties to calmly and rationally reflect on where we go from here".
Over the past year, Erdogan has faced ire for an economic recession which heralds double-digit inflation, rising costs of living and high unemployment. With 99 percent of the ballot boxes counted early on Monday, opposition candidate for Ankara mayor, Mansur Yavas was ahead with 50.89 percent of votes and the AKP on 47.06 percent, Anadolu state agency reported.
Rights activists and Turkey's Western allies say that under Erdogan's leadership, democracy has been eroded, particularly after a failed 2016 coup that led to tens of thousands of people being arrested.
Speaking at a news conference late Sunday, Erdogan said his party had lost some cities in the elections but was leading by far across the country.
Also, was it a simple development that at the trustee-appointed municipalities, people voted to bring back people they wanted?
Dawson called on the Turkish government to respect election results and said, "we do not accept assertions that assume every HDP mayor is or could be a terrorist or has terrorist connections".
If Imamoglu wins in Istanbul, the opposition will administer the three most populous cities.
Turkey will also have its first communist mayor, in the eastern province of Tunceli.