The Turkish president, rallying the diaspora, is facing a tougher race than once expected
Erdogan's election travels expose challenge at home
Looking out at thousands of European Turks who travelled to the Bosnian capital to hear him speak, Turkish President Recep Tayyip Erdogan could be forgiven for enjoying the moment.
Many arrived in the emotive setting of Sarajevo - a city rebuilt with Turkey's help - aboard buses from Germany, Austria and the Netherlands.
And days after a rally in Istanbul against Israel's policies in Gaza, Mr Erdogan's speech - his only opportunity to directly address his countrymen abroad before next month's Turkish elections - bolstered his self-styled role as a leader of the Muslim world.
"On June 24, we will not only elect a president and lawmakers but we will also make a choice for the next century of our country," Mr Erdogan said on Sunday, referring to the snap polls called more than a year ahead of schedule. "You are witness to what we have been doing in the past 16 years. I believe that you have the possibility of seeing and evaluating from abroad more comfortably what is going on in our country."
A blanket ban was imposed on similar campaign rallies throughout Europe but Muslim Bosnia's doors remained open to Mr Erdogan.
Given that the diaspora often leans heavily in favour of the president and his ruling party, the speech was more a case of realpolitik than nostalgia because there is renewed excitement in Turkish opposition circles, given the fielding of credible nationalist and secular candidates against Mr Erdogan.
He may have to go to a second round in the presidential race, and his ruling Justice and Development party (AKP) and its nationalist allies risk losing their majority in the legislature. They are facing a coalition that includes the secularists of the Republican People’s Party (CHP), the largest opposition bloc, as well as the breakaway nationalists of the Iyi (Good) party, and the Islamist Saadet Party that were once allies of the president.
"Diaspora Turks in central Europe are disproportionately pro-AKP, and this is a tight race in which they could deliver to him victory," said Soner Cagaptay, director of the Turkish programme at the Washington Institute and author of a biography on the current president.
There are around 1.2 million eligible Turkish voters in Germany alone, many hailing from conservative Anatolian heartland cities in Turkey's east and south-east. In Germany, Austria and the Netherlands they overwhelmingly voted for the AKP’s constitutional changes in last year’s referendum.
The run-up to the vote was marred with diplomatic spats between Turkey and its Nato allies in Europe, with Mr Erdogan describing them as Islamophobic and containing "Nazi remnants and fascists".
Now the message of mobilisation to his supporters abroad has been married to a message to his domestic audience.
The emotional appeal of a rally in Sarajevo, which Turkey has helped to transform from devastation amid growing influence in the Balkans, has coincided with strident condemnation by Ankara of recent Israeli violence in the Gaza Strip. Mr Erdogan rallied the Organisation of Islamic Countries (OIC) to a summit in Istanbul, and declared Israel a terror state in a Twitter spat with Prime Minister Benjamin Netanyahu.
"As far as the message to the home audience, it is about leadership of the Muslim world," said Sinan Ulgen, a former Turkish diplomat and visiting scholar at Carnegie Europe, part of the eponymous think tank.
"Turkey is a post-imperial nation and this idea of making Turkey great again is a theme that resonates in the heart of many Turks," said Mr Cagaptay. "Seeking 'Ottoman greatness' through foreign policy ... both with the pro-Gaza demonstrations and the Bosnia rally are part of that, and portrays those who oppose him domestically as being allied with Turkey’s foreign enemies."
The winner in the presidential contest will assume sweeping powers that were narrowly approved in a constitutional referendum last year.