By Dominic Evans and Ali Kucukgocmen
ISTANBUL (Reuters) - Less than a year after Tayyip Erdogan celebrated election triumph with fireworks in Ankara, Turkey's all-powerful leader faces the embarrassment of losing his capital in local polls marred by bitter campaign rhetoric and economic storm clouds.
Erdogan has ruled Turkey for 16 years with an ever-tightening grip and his June 2018 national election victory vastly expanded his presidential powers, alarming Western allies who fear Turkey is drifting deeper into authoritarianism.
But the 65-year-old president could be brought down to earth on Sunday when Turks vote in municipal elections which threaten to inflict the first defeat for his Islamist-rooted AK Party in Ankara or the country's biggest city and business hub, Istanbul.
Erdogan has portrayed the vote as an existential choice for Turkey, blasting his domestic opponents as terrorist supporters and even invoking the New Zealand mosque killings as examples of the broader threats he says Turkey faces.
"It is a matter of survival against those who want to divide this country and tear it to pieces," he told hundreds of cheering supporters at a rally earlier this month in central Istanbul's Eyup Sultan district, next to a 19th-century mosque.
He has toured the country for weeks speaking up to eight times a day - a punishing routine which showcased the supreme campaigning skills that have made him the most popular and powerful leader since modern Turkey's founder, Mustafa Kemal Ataturk.
It also highlighted, his critics say, Erdogan's growing reliance on divisive rhetoric since a currency crisis in August ended years of strong economic growth which had helped deliver successive election wins for his AKP, attracting support from well beyond its conservative Muslim core.
A steep fall in the lira last Friday revived memories of last year's meltdown, and provoked a flurry of stop-gap measures to halt a slump on the eve of voting which could erode support.
For many Turks, the vote is all about whether Erdogan can still deliver a decent standard of living.
"A crushing majority of people - including of course voters from the government party and its partners - think the economy is the number one problem in Turkey," said political analyst Murat Yetkin.
Some polls give the main opposition Republican People's Party (CHP) candidate in Ankara, Mansur Yavas, a lead over his AKP rival. In Istanbul, where the AKP is fielding former prime minister Binali Yildirim, the race appears close with the CHP.
Other cities may also be seized by the secularist opposition party.
REFERENDUM ON ERDOGAN
Analysts caution against reading too much into polling data - Erdogan won a first-round presidential victory last year, defying many expectations - and even if the AKP were to lose, it would not diminish the president's official powers.
But those very powers that he assumed last year leave him increasingly exposed when things go wrong.
"The whole system has been so centralized around one individual that even a municipal election is a referendum on Erdogan himself," said Wolfango Piccoli, co-president of Teneo political risk advisers.
Defeat in either city would bring to an end a quarter century of rule by Erdogan's AKP and its Islamist predecessors, and deal a symbolic blow to a leader who launched his career in local politics and served as mayor of Istanbul in the 1990s.
For two months he has addressed rally after rally, repeating well-honed presentations that include campaign songs, gifts of tea to supporters and lists of AKP achievements from garbage clearing to home building and infrastructure mega-projects.
Overwhelmingly supportive media broadcast hours of live coverage. Campaign posters proclaim that Istanbul is "a love story" for the AKP, and municipal duties are a "labour of love".
But Erdogan also promises his political opponents he will "bury them in the ballot boxes" just as Turkey's armed forces have killed militants from the outlawed Kurdistan Workers Party (PKK), which he regularly links to the pro-Kurdish HDP party.
In the speech in Eyup Sultan he said CHP leader Kemal Kilicdaroglu, an election ally of the HDP, was "arm in arm" with a terrorist organization. "Who is behind him? Terrorists are behind him. Mr Kemal is walking together with them".
The CHP and HDP deny any links to the PKK.
To his passionate supporters, Erdogan is speaking a self-evident truth. "I see, I hear, and I believe what I see and hear - not just what Reis (the chief) says," Ismail Zeybek, a 40-year-old electrician, said at the rally.
Others say that by portraying the vote as a question of survival, the president is splitting his country. "What kind of relation could there be between local elections and existence? He is trying to win votes by polarizing," said Mert Efe, a resident of Istanbul's Besiktas district, a CHP stronghold.
When a lone gunman opened fire in two mosques in New Zealand a fortnight ago, Erdogan said if anyone tried to come to Turkey to do harm they would be sent back "in caskets" like Australian and New Zealand troops who fought Ottoman soldiers in Gallipoli a century ago.
He repeatedly showed extracts from the gunman's manifesto, which he said threatened Turkey and Erdogan himself, as well as blurred footage from the shooting itself - even after New Zealand's foreign minister flew to Turkey to ask him to stop.
"Looking at the rhetoric he is using, we have never seen this before on a municipal level. It's unprecedented," Piccoli said. "This concentration of power is running short of ideas, that is why he is pushing more and more this nationalist, religious agenda."
In the final days of campaigning Erdogan also revived calls for Istanbul's Hagia Sophia museum - the foremost cathedral in Christendom for 900 years and then one of Islam's greatest mosques for 500 years until 1935 - to become a mosque again.
FOUR MORE YEARS?
After winning a 2017 referendum on his powerful executive presidency, and then last year's hard-fought parliamentary and presidential elections, Erdogan could in theory enjoy the next four years free from electoral challenge.
A poor showing on Sunday, however, would strain his parliamentary alliance with the nationalist MHP party, raising the possibility that Erdogan could be back on the campaign trail sooner than the next scheduled national elections in 2023.
If the AKP suffers a "large-scale shock" involving the loss of both Ankara and Istanbul, or saw the share of the vote taken by the AKP/MHP alliance fall well below 50 percent, it would be a clear sign that Erdogan's party is on the wane, said Sinan Ulgen, a former Turkish diplomat and analyst at Carnegie Europe.
"That would have consequences over time. It would make it more difficult to hold onto power through 2023, especially given that this perceived political weakness would be combined with the economic slowdown," Ulgen said.
If the vote does not go the way Erdogan hopes, he will be faced with a more immediate decision on Sunday night.
Asked whether he plans to address supporters again as he did triumphantly from his AKP headquarters in Ankara last June, Erdogan said his balcony speech had become an election night tradition.
"We did this in every election. I think it would not be right if we didn't do it at this election. But we have not sat down with colleagues to make this decision yet."
(Additional reporting by Omer Berberoglu and Daren Butler; Editing by Pravin Char)