Turkey's President Recep Tayyip Erdogan speaks after receiving a honoris doctorate from the International University of Sarajevo, in Sarajevo, Bosnia, May 20, 2018. Turkey's president addressed thousands of expatriate Turks in Bosnia's capital Sunday to shore up support before his country's snap presidential and parliamentary elections next month.

Turkish President Recep Tayyip Erdogan took a swipe at European countries that refused to let him campaign on their territory on Sunday as he called at a rally in Bosnia for expatriate Turks to vote for him and his ruling AK Party in elections next month.

The presidential and parliamentary polls on June 24 will see Turkey switch to a powerful, executive presidential system that was narrowly approved in a referendum last year.

"As European Turks you have always supported us by a wide margin. Now we need your support again in the elections on June 24," Erdogan told a rally in a Sarejevo sports hall, where supporters waved Turkish and Bosnian flags.

Ahead of the 2017 referendum, ministers traveled to countries with big Turkish communities -- including Germany and the Netherlands -- to urge support for the change, but were stopped from campaigning by authorities citing security fears. Erdogan nevertheless said last month he was expecting to hold a campaign rally in a European city.

"At a time when renowned European countries claiming to be the cradle of civilization failed, Bosnia and Herzegovina showed by allowing us to gather here that it is a real democracy not a so-called one," he told a crowd of around 15,000.

Austrian Chancellor Sebastian Kurz, who heads a right-wing coalition opposed to Turkey joining the European Union, said last month Erdogan would be barred from "trying to exploit" Europe's Turkish communities.

Germany, home to about 3 million people of Turkish origin, says it will not allow foreign politicians to campaign on its territory ahead of elections.

Earlier in the day, Erdogan pledged a multibillion-euro investment in a motorway connecting Belgrade and Sarajevo. Thousands of Turks came from Germany, the Netherlands and Austria, and from across the Balkans for the rally.

"Turkey is our mother nation," said Coskun Celiloglu, a Macedonian student of Turkish descent. "We came to Sarajevo just for one day to support our savior Erdogan."

The most popular -- and divisive -- politician in recent Turkish history, Erdogan has ruled for 15 years, overseeing a period of rapid economic growth. But a widespread crackdown against his opponents has led rights groups and Western allies of the NATO member to voice concerns about Turkey's record on civil rights and Erdogan's growing authoritarianism.

On Saturday, Turkey's state-run Anadolu agency reported there had been tip-offs about a potential assassination attempt against Erdogan while he visits the Balkans.

Asked about the report, Erdogan said: "This news reached me and indeed that is why I am here ... Such threats and operations cannot deter us from this path."