THE horrific attack on Istanbul’s Ataturk Airport on Tuesday evening, which killed at least 41 people and injured hundreds more, suggested that the Islamic State’s capacity to mount major raids on strategic international targets remains robust in spite of its losses of territory and key operatives in Iraq and Syria.

The self-styled caliphate prizes ambiguity about its operations in Muslim majority Turkey and did not claim responsibility for the assault by multiple gunmen wearing suicide-bomb vests. But Turkish officials were right in saying it had all the hallmarks of the Islamic State’s campaign to sow chaos in the big cities of the states allied against it.

By now, governments across Europe and the Middle East are on high alert for terrorist suicide attackers, and several cells have been broken up before they could act. One disturbing aspect of the Istanbul assault is that it succeeded in spite of tight Turkish security.

The attackers were spotted soon after they emerged from a taxi outside the airport; at least two were shot by security forces, and only one made it inside the international terminal. The explosives they detonated were nevertheless able to slaughter dozens of people, some of whom were waiting in security lines.

That suggests airport authorities may need to reexamine procedures for screening people as they arrive.

More broadly, Istanbul shows that the threat of major, coordinated terrorist attacks by the Islamic State has not been much diminished by successes such as the recent recapture of the Iraqi city of Fallujah, or the killing of senior Islamic State commanders and organizers in U.S. raids and drone strikes.

The elimination of the terrorists’ two principle bases, Mosul in Iraq and Raqqa in Syria, is necessary not just to liberate Iraqis and Syrians but also to protect the citizens of Western democracies and allies such as Turkey.

Progress toward that goal is still too sluggish — especially when it comes to forging the political arrangements that will be necessary to create an Iraqi alliance that can capture multiethnic Mosul and peacefully govern it afterward.

Perhaps not by chance, what was merely the latest in a series of Islamic State attacks inside Turkey came just as its impulsive and increasingly autocratic president was moving to repair his regime’s threadbare foreign relations.

Turkey and Israel announced this week that they were mending a six-year rupture precipitated by President Recep Tayyip Erdogan’s reckless support of attempts to break the Israeli blockade of the Gaza Strip. At the same time, the president apologized for the downing of a Russian warplane that crossed into Turkey from Syria in November, potentially opening the way for a rapprochement with Vladi­mir Putin.

A Turkey that is less at odds with fellow enemies of the Islamic State will increase the pressure on the terrorists; the horror in Istanbul merely underlines the need for that.