Pope Francis's visit Saturday to Bosnia, where he is expected to be greeted by 100,000 people, is posing a significant security challenge in the Balkan country that has become a fertile ground for homegrown jihadists, experts said.
The pope's one-day stopover in Sarajevo comes a month after an attack on a police station in northeastern Bosnia in which a suspected member of a local Islamist movement shot an officer dead and wounded two others before he was killed in the shootout.
"We must finally face the fact that there is a serious problem of terrorism which is growing in Bosnia," Security Minister Dragan Mektic said after the deadly attack in Zvornik.
Bosnia has grappled with a radical Islamist legacy left behind after its 1990s war that drew Islamist fighters from around the globe.
A previous attack, labelled terrorist in nature by the government, came in 2011 when an Islamist gunman opened fire at the US embassy in Sarajevo.
He wounded a policeman before being injured himself and was arrested.
But the incidents have not put into doubt the pontiff's visit, which was announced in February.
"There is no particular concern for the safety" of the pope, Vatican spokesman Federico Lombardi said.
During Pope John Paul II's visit to Bosnia in 1997, two years after the Balkan wars ended, police discovered explosives under a Sarajevo bridge that the pontiff was to cross just hours later. Those responsible were never found.
Jasmin Ahic, a professor at the Sarajevo University School of Criminology, estimated that Pope Francis's visit however comes at "very delicate" moment.
"The pope arrives at a time when the security threat is at a rather high level," Ahic, an expert on terrorism issues, told AFP.
"It is really a huge security challenge. But if such a visit goes well, it will prove that the capacity of the country's security authorities is at satisfactory level."
Also, the visit would have certainly been cancelled if the threat level was high, he added.
Bosnia's inter-ethnic war in the 1990s attracted hundreds of Islamists from across the Arab world to join Muslim forces in the fighting.
Most of the foreign fighters -- known as "mujahedeen" -- have now left, but their beliefs have left a mark.
Bosnia's Muslims, who make up 40 percent of the country's 3.8 million inhabitants, are mostly moderates.
But the strict interpretation of Islam by the foreign fighters has been adopted by some locals, who 20 years after the 1992-1995 war here ended, are fighting alongside jihadists in the Middle East.
Some 200 Bosnians are believed to have joined jihadist groups fighting in Iraq and Syria, with some 50 believed to have already returned to Bosnia, the intelligence services estimate.
"Those who return to the country are very dangerous... after such an experience, they are not the same people," Ahic warned.
In the past several months local authorities have arrested and charged with terrorism offences more than a dozen men suspected of fighting alongside the Islamic State group in Syria and Iraq or recruiting for the insurgents.
If found guilty the suspects face up to 20 years in jail under a law adopted by Bosnia last year.
The trial of radical imam Husein Bosnic, a former member of a mujahedeen unit in Bosnia's war, opened before a Sarajevo court in January. He was the first person to go on trial here accused of recruiting people for jihad.
The authorities claim that the security situation is under control and that the most strict measures have been taken to ensure that the papal visit goes on well.
"We will not allow anyone who possibly thinks otherwise and who could endanger the visit to provide a space" for implementing his intentions, said recently the head of a unit coordinating police and intelligence services, Mirsad Vilic.
According to Vilic, the threat factors were being constantly assessed in cooperation also with the regional intelligence services.
"However, absolute security does not exist and everyone has to be aware of that," he warned.
The Croat member of Bosnia's tripartite presidency, Dragan Covic, urged the faithful not to hesitate to come to Sarajevo due to security concerns.
"We have put everything in place so that everything goes on well," he said.