Anadolu cautioned that counts were unofficial, and that official results would be released by the High Election Council.

The head of that council, Sadi Guven, said in Ankara on Tuesday that it had shared preliminary results with political parties. For now, he said, the council will give certificates of election to candidates whose victories are not subject to appeals, which can be submitted until 3 p.m. Tuesday.

The council will rule on those challenges within eight days, he added.

Mr. Erdogan, who was re-elected last year, and his party have seen their popularity eroded by Turkey’s deep economic troubles. But a spokesman for the president, Ibrahim Kalin, refuted claims that Mr. Erdogan’s hold on power is waning, noting that the governing party had drawn the most votes in local elections nationwide.

“They will never learn. AK Party won 44.3 % and the coalition won 51.6 % of the votes,” Mr. Kalin posted on Twitter. “Erdogan has his mandate until 2023. Stop presenting your wishful thinking as fact and analysis.”