Wednesday’s terror attack in Paris, foul as it was, was sadly no great surprise given the movement of Islamist terrorists between Europe and the Middle East.

The Israeli intelligence community currently estimates that there are some 30,000 Islamic State activists; the CIA puts the number anywhere between 20,000 and 31,500. About half of them are foreign volunteers from around the Islamic world and the West. The Magreb states, surprisingly, are the most prominent suppliers, notably including Shiite Tunisia, where 5,000-6,000 IS fighters come from. Thousands have joined IS in Iraq and Syria from Europe, Australia and the United States. Within Europe, Belgium heads the list of suppliers.

Europes’s problem, and this may well have been the case with the massacre in France, is the relative ease with which young Muslims can leave Western countries, join the ranks of IS in Syria and Iraq, and then go back to their homes and attack targets there. It’s an almost impossible mission for European intelligence agencies to track every Muslim youth who goes to the Middle East and then returns home or to a neighboring country with the goal of murdering “infidels.”

Apart from tracking this flow, Western intelligence agencies have another challenge, no less complex. Islamic State is inspiring many youngsters to carry out attacks without first coming to the Middle East. These potential assailants have not fought with IS or spent time in another Muslim state, but make do with getting hold of weapons in their home countries and going out to commit attacks. Thwarting these kinds of attacks must be a nightmare for the intelligence services.

There is no discernible serious effort on the part of the Turkish authorities to stop the flow of IS volunteers. Moreover, half of IS’s income these days comes from the sale of oil, and the number one importer is Turkey

The Middle East-Europe connection does not end there. It is reasonable to assume that given the slowing of IS’s advances in Syria and Iraq — there is a deceleration in its conquest of territory — IS will try to send offshoots to countries such as Libya and Egypt and from there to orchestrate more attacks on European soil. In other words, if IS is taking a hit in the Middle East, it will try to hit back in Europe.

Turkey is said to be the gateway to Europe, and the case of IS proves the point. The thousands of volunteers who seek to join its ranks do so mainly via Turkey. They go back home via Turkey too. And yet, there is no discernible serious effort on the part of the Turkish authorities to stop this flow of volunteers. This, despite the fact that as recently as Tuesday, Istanbul sustained an act of terrorism when a female suicide bomber killed a policeman. (It’s not entirely clear whether this was the work of Islamic extremists, radical leftists or another organization.)

Moreover, half of IS’s income these days comes from the sale of oil, and the number one importer is Turkey. (The rest of IS’s income comes from taxes and bribes.)

Until the start of Western and Arab counterattacks on IS, the terror group was earning $2 million a day from oil sales. Since the start of air attacks, which have caused massive damage to IS-controlled refineries, that income has slumped to several hundred thousand dollars a day. IS has adjusted accordingly. It has moved its headquarters from Mosul (in what used to be Iraq) to Raqqa (in what used to be Syria). And it has realized that its tanker convoys are an easy target from the air and now sends those tankers alone or in groups of no more than three. It sells its oil to local power brokers via middlemen, or exports it to Turkey, where it also uses middlemen, although everybody knows the source. So long as the price is low, Turkish Prime Minister Recep Tayyip Erdogan doesn’t seem to care.

Indeed, Ankara is marked out now as the primary protector of Sunni terrorist organizations. Hamas has established its military headquarters there. Its political bureau chief Khaled Mashaal is set to relocate to Turkey from Qatar shortly. The Khorasan group, mentioned in connection with the first American attack on Syrian territory, now operates from there. And then, of course, there is the blind eye that Turkey turns to the flow of IS fighters and the murky business dealings.

Such relative good news as there is about the battle with IS comes from the Middle East itself. IS has taken something of a hammering of late and its progress has slowed. That is not to say that it has been stopped, but its efforts to expand its territorial holdings towards Homs and Kobane are not progressing. Kurdish fighters, for instance, have gained control of 80 percent of Kobane in recent days, forcing IS to withdraw from territory it held.

Still, IS is upgrading its military equipment, and its numbers are growing. It now has hundreds of heavy vehicles — including armored vehicles, which are easy targets from the air; advanced anti-tank weapons (Cornet); anti-aircraft missiles (Strella); Katyusha rockets; and even three training aircraft. The most potent weapon in its arsenal, however, is chemical weaponry — including chloride. This may have been used in Mosul and Kobane.

IS fighters deploy in the manner of a true army. Before attempting to conquer a target, they gather information, then they soften up the target with artillery fire, and then they attack, with covering fire and with primitive UAVs providing real-time intelligence as the battle progresses. If they run up against a gate or other insurmountable physical obstacle, they send a suicide vehicle to detonate and smash through. They might slow their progress in one area and instead focus on making advances in another. And yet, despite all that, IS does not constitute a significant threat to a well-oiled standing army with a strong air force.

IS has also made no shortage of mistakes in its dealings with the locals in areas it has captured. In one town in eastern Syria, Mayadeen, it tried to ban smoking. The response was not long in coming. Its local deputy police chief was kidnapped and beheaded. One report claimed the severed head was found, cigarette in mouth, next to a note reading, “smoking is forbidden.”