Story highlights

"We will continue to work for our nation," Erdogan told a crowd in Istanbul

Turkish Prime Minister Tayyip Erdogan will become the country's first directly-elected president by a wide margin of votes, according the semi-official Anadolu News Agency.

Erdogan stopped short of declaring victory when he spoke Sunday night.

"We will continue to work for our nation, we will continue to serve our homeland," Erdogan told a crowd in Istanbul. "We will continue our fight for advanced democracy and sovereignty of democracy standards."

With nearly 98% of the votes counted, Erdogan avoided a runoff by winning more than 52% of the votes, according to CNN Turk and Anadolu News Agency.