Despite escalating losses in Iraq and Syria, the ability of ISIS to continue to carry out (or inspire) attacks far beyond those countries should not be overlooked. This spring alone, the group has claimed bombings or assaults in Sweden, Egypt and the U.K.

As defeated fighters return home from the front lines, here are the top five countries of origin for ISIS foreign fighters — as ranked by a 2016 study for the National Bureau of Economic Research — and why each has reason to worry:

Tunisia

Of the six countries caught up in the Arab Spring, democracy has taken hold only in Tunisia. And it looks to have staying power: six years on from the ousting of autocratic President Zine el Abidine Ben Ali, 86% of Tunisians say democracy is the best system of government, up from 70% at the time of the revolution. More importantly, enthusiasm for democracy comes at a time when just 15% of Tunisians believe the economy is doing well and 90% say corruption is prevalent.

Unfortunately, Tunisia’s newfound enthusiasm for democracy is not shared by all. Roughly 6,000 Tunisians have left home to join the ranks of ISIS, the highest per capita rate in the world. The ISIS admirers who stayed behind are just as worrying; it was a Tunisian inspired by ISIS social media who was responsible for the 2015 beach shooting that left 38 dead (most of whom were foreign tourists), the deadliest terrorist attack in the history of modern Tunisia. Democratic growing pains, ongoing economic struggles, and the return of defeated jihadists will continue to give ISIS openings into the country.

Saudi Arabia

The Saudi kingdom, an active promoter and sponsor of Wahhabism, the fundamentalist strain of Islam that serves as the backbone of modern Islamic extremism, is the second largest source of foreign fighters for ISIS — roughly 2,500 have joined. It’s also a terrorist target itself. In July 2016, it suffered a triple suicide-bombing attack across three cities; in May 2015, an ISIS bombing killed 21 people.

The kingdom came into being when tribal leader Abdulaziz al-Saud conquered the land we now know as Saudi Arabia in 1932 and struck a deal with clerics to solidify his rule; al-Saud and his descendants (today’s royal family) manage the security, politics and foreign affairs of the country, and the clerics have charge of religious matters. The marriage remains troubled, because the royal family is more open to dealing with the West than its clerical counterparts. That’s why ISIS considers modern Saudi Arabia a perversion of Islamic statehood. And that isn’t going to change.

Russia

The ISIS corps stem from well beyond the Middle East. Russia is no stranger to terrorism either; more than 3,500 people have died in 800+ attacks in the country since 1970. The latest took place just last week when a bomb exploded in the St. Petersburg subway, killing 14 people. No group has yet claimed responsibility, but Russian state media has suggested links to ISIS or other international terror franchises. The assailant has been identified by Russian authorities as Akbarzhon Dzhalilov, a 22-year-old Russian national born in Kyrgyzstan.

Russia’s history with terrorism centers mainly on the Northern Caucasus regions of Chechnya, Dagestan, and Ingushetia, predominantly Muslim regions that have sought independence from Moscow, often through violent means, on and off for nearly 300 years. The collapse of the USSR in 1991 breathed new life into the region’s independence movements and led to two particularly bloody wars in Chechnya that claimed thousands of lives. In 2002, Chechen militants took 912 people hostage in the Dubrovka Theater in Moscow; 130 of those hostages ended up being killed. In 2004, Chechen rebels stormed a school in Beslan and took more than 1,200 hostage; more than 330 people were killed, including 186 children.

Foreign religious extremists like ISIS have made headway into recruiting from the North Caucasus, including from the migrant communities in major cities to which Dzhalilov may have belonged. Russian President Vladimir Putin himself estimates that between 5,000 and 7,000 people from Russia and other former Soviet republics have traveled to Syria to take up arms with ISIS and other militants. For Russia, the fight against Islamic terrorism is oftentimes a fight with itself.

Turkey

Turkey has its own fraught relationship with an ethnic minority agitating for independence. The Kurds are an ethnic group that number between 20 million and 40 million who straddle the borders of Turkey, Iraq, Syria, Iran and Armenia. Denied their own state when the borders of modern Turkey were established following World War I, they are now the world’s largest stateless ethnic group. Kurdish fighters have spent decades fighting the Turkish government to carve out an independent state for themselves, and some have resorted to terrorism; over the past three decades, more than 40,000 people have been killed in clashes between Turks and Kurds.

Complicating matters is that Kurds in Syria are one of the most effective forces fighting both Assad and ISIS. Their success could create an independent Kurdish state inside Syria, which might encourage a larger share of Turkish Kurds to take arms with the same goal. So one of the greatest terrorist threats against Turkey is also a threat to ISIS.

At the same time, roughly 2,100 Turks have traveled to Iraq and Syria to join ISIS. Since 2015, more than 400 people have been killed in terrorist attacks throughout the country. In other words, Turkey’s terrorism problem is only becoming more complicated.

Jordan

Rounding out the list of top sources for ISIS foreign fighters is Jordan, which has seen nearly 2,000 people join ISIS over the past few years. Like Turkey, which is hosting 2.9 million Syrian refugees, Jordan is also taking in more than its fair share of the region’s displaced people — the 655,000 Syrians it’s putting up represent 8.5% of its total population of approximately 7.5 million.

Relative to the rest of the Middle East, terrorist attacks in Jordan are quite rare, a fact which has earned it the unofficial title of “Kingdom of Peace.” That peace was broken in December 2016 when ISIS terrorists attacked the popular tourist destination Karak Castle, killing 10 people in the process and injuring another 34. It was the first civilian-targeted terrorist attack in Jordan in more than a decade. For a group as PR-savvy as ISIS, being regarded as a safe place is an invitation for bloodshed.

Get The Brief. Sign up to receive the top stories you need to know right now. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Contact us at letters@time.com.