European intelligence sources fear that as the caliphate crumbles ISIS might try and turn Bosnia into a terror state.

According to the Forum for the Study of International Terrorism, the Balkan country’s long ties with Islam put it at risk of becoming a safe haven for the death cult.

“Islamist infrastructure has been around in Bosnia for the last three decades,” terror expert Djevad Galijasevic said.

“There are no obstacles preventing it from developing. Propaganda of (radical ideas) and financial assistance (to extremists) have continued unabated.”

He added: “One can buy any weapon in Bosnia. Some terrorists have their own banks.”

But forum president Milan Pasanski cautioned that terrorists will unlikely cross borders into the European Union because of rigid enforcement.

Instead, terrorists will nest on the “periphery”, probably Bosnia, Kosovo and the Serbian region of Sandžak and Bosnia, he said.

Just last week Austrian cops busted Nedzad Balkan — a radical Bosnian extremist — who was thought to be establishing new terror networks in Austria, Germany and Switzerland.

“By detaining Nedzad Balkan, Austrian authorities have indicated that if a second wave of refugees comes, they will not turn the blind eye on the fact that terrorists could be among them,” Pasanski said.

“It’s common knowledge that Vienna has become a place where Islamic fundamentalists, with some coming from Bosnia, gather.”