Turkey's Tayyip Erdogan emerged victorious on Monday from his biggest electoral challenge in a decade and a half, giving him the sweeping, executive powers he has long sought and extending his grip on the nation of 81 million until at least 2023.

The most popular and divisive leader in modern Turkish history, Erdogan pledged there would be no retreat from his drive to transform Turkey, a deeply polarised nation that is both a NATO member and, at least nominally, a candidate to join the European Union.

Erdogan, 64, and his ruling AK Party on Sunday claimed victory in presidential and parliamentary polls, overcoming a revitalised opposition that in recent weeks had gained considerable momentum and looked capable of staging an upset.

He took 52.5 percent of the vote in the presidential race, with more than 99 percent of the votes counted. His AK Party took 42.5 percent in the parliamentary polls, and was boosted by its nationalist allies, which outstripped expectations and took 11.1 percent.

The lira, which has lost some 20 percent of its value this year, rallied overnight as far as 4.5870 against the dollar before surrendering much of its gains to trade at 4.6350 at 0432 GMT. It closed at 4.6625 on Friday.

The opposition had said late on Sunday it was still too early to concede defeat. The main opposition's candidate, the combative former teacher Muharrem Ince, took nearly 31 percent. Erdogan has repeatedly cast his opponents as enemies of democracy, tapping into the groundswell of nationalist feeling that followed a failed coup in 2016.

"It is out of the question for us to turn back from where we've brought our country in terms of democracy and the economy," he said on Sunday.

"There is no stopping for us until we bring Turkey, which we saved from plotters, coupists and political and economic hitmen, street gangs and terrorist organisations, to among the top 10 economies in the world."

The vote ushers in the powerful, new executive presidency backed by a narrow majority in a 2017 referendum. Critics have said it will further erode democracy and entrench one-man rule.

A masterful campaigner, Erdogan has overseen years of strong economic growth and won the loyalty of millions of pious, working class Turks for delivering schools, hospitals and infrastructure.

But he has also launched a widening crackdown against opponents, that has seen some 160,000 people jailed and media outlets shut down.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.