ISTANBUL: Turkish President Recep Tayyip Erdogan on Monday emerged from his toughest election test unbowed and in strong position to extend two decades of his Islamic-rooted rule by another five years in a historic May 28 runoff.

The 69-year-old leader defied pollsters and his country's most dire economic crisis since the 1990s to come within a fraction of a percentage point of winning Sunday's presidential ballot.

His right-wing party also retained control of parliament through an alliance with ultra-nationalists on a drama-filled night that concluded with Erdogan delivering a victory speech from a balcony to jubilant supporters.

He even won in regions hit by a calamitous February quake that claimed more than 50,000 lives -- and where anger at the government's slow response to Turkey's worst disaster of modern times was seething.

“A staggering win for Erdogan,“ emerging markets economist Timothy Ash said in a note to clients.

“He has the magic dust at these times. And he just gets Turks -- the nationalist, socially conservative and Muslim ones.”

'Very high risk'

The main opposition party led by Kemal Kilicdaroglu confronted the reality Monday that they were unable to beat Erdogan at one of his most vulnerable moments.

“Don’t despair,“ Kilicdaroglu told his supporters. “We will stand up and take this election together.”

Turkey's election officials Monday confirmed that there would be a second round because the remaining uncounted votes could not swing the outcome.

Erdogan secured 49.5 percent of the vote and Kilicdaroglu picked up 44.9 percent.

Nationalist candidate Sinan Ogan -- a former member of a far-right party now allied with the government -- had 5.2 percent.

Official turnout reached a record 88.9 percent.

The markets were depressed and Erdogan's supporters ecstatic.

The lira touched new lows against the dollar and stocks on the Istanbul exchange fell on a realisation that the era of Erdogan's unconventional economics may not be over.

“We think Turkey is now at very high risk of an increase in macroeconomic instability,“ the Capital Economics consultancy said.

'Superb success'

The view was far different in the more nationalist and conservative corners of Turkey.

“The people won!” the right-wing Yeni Safak newspaper proclaimed in a banner headline.

The pro-government Sabah daily called Erdogan’s performance a “superb success”.

Erdogan supporter Hamdi Kurumahmut was brimming with confidence in the morning after the night of Turkey's biggest election of its post-Ottoman era.

“Erdogan is going to win. He is a real leader. The Turkish people trust him. He has a vision for Turkey,“ Kurumahmut told AFP in Istanbul.

“There are things that need to be improved, on the economy, education or the refugee policy. But we know he’s the one who can sort all that out,“ the 40-year-old tourism sector worker added.

Some Kilicdaroglu supporters tried to stay positive.

“I don’t want to even think about a scenario in which Erdogan wins,“ Emin Serbest said as the last voted were being counted.

“If Kilicdaroglu wins... a beautiful time awaits us,“ said the 33-year-old Istanbul municipality worker.

'Identity, terrorism and security'

But most analysts feel that Kilicdaroglu and his six-party opposition alliance will have a difficult time halting Erdogan's momentum over the coming two weeks.

“The president is likely to ride his strong approval rating, surprise win in parliament, and incumbency advantages to secure re-election,“ said Emre Peker of the Eurasia Group consultancy.

His ruling alliance’s similarly strong performance in the legislative polls suggests “identity, terrorism and security issues played well with Erdogan’s broader conservative base and helped the president make up for his economic shortcomings”, he added.

Political risk consultant Anthony Skinner said Sunday's result underscored the difficulty of trying to gauge public opinion in the strongly polarised nation of 85 million people.

“Many pre-election public opinion poll results did not reflect Erdogan’s resourcefulness and the degree of support he still enjoys in the country,“ the veteran Turkey watcher said.

“It just goes to show how careful one needs to be when looking at public opinion polls prior to elections.” - AFP