Turkish President Recep Tayyip Erdogan said that an agreement has been reached on sending 200 Kurdish pesh merga fighters from Iraq through Turkey to help defend the Syrian border town of Kobane against the Islamic State. (Reuters)

WESTERN LEADERS sometimes suggest that the Islamic State is its own worst enemy, so extreme in doctrine and practice that it will galvanize opposition within the Islamic world. While that is proving true to some extent — Muslim governments, senior clerics and even other jihadist groups have joined the fight against the would-be caliphate — the sobering truth is that the Islamic State also has picked up popular support and the allegiance of other militants in countries as far away as Algeria and Pakistan.

The spread of the group’s medieval doctrine and tactics, such as beheading, is a product of its military successes in Iraq and Syria and its skill at social media, which bypasses the more traditional and restricted channels of communication in Arab autocracies. The contagion shows that the reversal of the group’s momentum is crucial not just to the future of Iraq and its neighbors but also to the broader battle against Islamic extremism around the world.

Predictably, groups swearing allegiance to the Islamic State have appeared first in areas where state authority has broken down. Affiliates have declared themselves in at least two Libyan cities, and an Algerian cell swore allegiance to Islamic State leader Abu Bakr al-Baghdadi before beheading a French hostage last month. The chief spokesman for the Pakistani Taliban and five of its commanders declared allegiance last week, shifting their fealty from the somewhat more moderate Afghan Taliban leadership of Mullah Omar.

In Egypt, the Sinai-based Ansar Bayt al-Maqdis group has beheaded at least nine captives since August, according to a report in the Los Angeles Times, and a commander boasted to a Reuters reporter that the Egyptian group had online contacts with the Islamic State. Even the Abu Sayyaf terrorist group in the Philippines has attempted to trade on the Islamic State aura; it released a statement last month threatening to kill two German hostages unless Germany withdrew from the U.S.-led coalition against the extremists.

Even more disturbing are signs that the Islamic State has the sympathy of many noncombatants in the region. In the Lebanese port of Tripoli, a longtime stronghold of radical Sunni groups, murals of the group’s black flags are painted on buildings in the center of the city, according to the Wall Street Journal. In Turkey, pro-Islamic State students at Istanbul University have triggered a series of fights on campus, according to the Associated Press. In Jordan, a recent poll showed that only 62 percent of respondents considered the Islamic State terrorist, according to David Schenker of the Washington Institute for Near East Policy. Such popular sentiment explains why leaders such as Turkey’s Recep Tayyip Erdogan have been reluctant participants in the anti-Islamic State coalition.

The Obama administration has recognized the danger of the Islamic State’s appeal and has pushed for political steps to combat it, such as public statements by clerical authorities. Ultimately, however, the group’s pull will likely be governed by the maxim once formulated by Osama bin Laden: “When people see a strong horse and a weak horse, by nature, they will like the strong horse.” Islamic extremism won’t be defeated by military might alone. But to many in the Islamic world, the Islamic State now looks strong. The only way to reverse its influence is through its military defeat, sooner rather than later.