Ten hours after Salman Abedi blew himself up outside the Manchester Arena, where the American pop star Ariana Grande was performing, ISIS claimed a grisly attack that killed twenty-two people and injured dozens more. “With Allah’s grace and support, a soldier of the Khilafah (caliphate) managed to place explosive devices in the midst of the gatherings of the Crusaders in the British city of Manchester,” the group boasted on social messaging apps, in multiple languages. The odd thing—for a group that has usually been judicious about its claims and accurate in its facts—is that it got key details wrong.

The discrepancies were conspicuous—and clumsy. In one early claim, the message referred to a “security detachment,” as if there were multiple operatives. It implied that the attack involved multiple bombs left on site. It missed the fact that a lone bomb had been detonated in a single suicide operation. It did not refer to a “martyr,” as it usually does when perpetrators are killed. It did not name or claim Abedi.

“It looks like the work of ISIS,” a U.S. counterterrorism official told me on Monday, although the British investigation was ongoing. Yet the mistakes also spurred speculation about ISIS’s command of foreign operations, its communications with operatives or sympathizers, and even its access to news, which had already reported the basics of the attack. Just how much has ISIS been disrupted?

The Islamic State’s physical caliphate has been steadily shrinking, mile by war-ravaged mile, since the onset of a U.S.-backed military campaign last October. ISIS has now lost sixty-six per cent of the territory it conquered, in 2014, in Iraq, and almost half of its territory in Syria, a State Department official told me. It was once about the size of Indiana, or the country of Jordan. So far, more than four million people have been “liberated” from ISIS rule, and 2.7 million in Iraq and 1.4 million in Syria remain, the official said.

The vast majority of foreign fighters on the battlefields in Iraq and Syria have also been killed, according to U.S. military officials. Since 2014, at least forty thousand foreigners from around the globe have gravitated to the Islamic State; only about a quarter are still on the battlefield. The rest have been killed or have abandoned the fight. In Mosul, once the largest city in its pseudo-state, ISIS has “significantly less than a thousand” fighters in its desperate bid to hold on to a small but densely packed section of the Old City, the official said.

As its military losses mount, ISIS has turned its sophisticated online propaganda machine into an instruction manual for lone-wolf missions far from its own territory. Its main publication is the slick multi-language magazine Rumiyah, Arabic for “Rome,” taken from a prophecy that Muslims will one day conquer that city, which is a symbol of Christianity and the West. Rumiyah replaced Dabiq, a magazine named after a Syrian town where the prophecy claimed that Armageddon would take place. Then, last year, ISIS lost the town of Dabiq. Its sights, and its publication, shifted.

Rumiyah, launched last fall, seems to have made an impact. “Those Muslims residing in the West, in particular, have an opportunity to terrorize the Crusaders themselves,” it urged, in October. In two early issues, it called on lone jihadis in Europe and the United States to launch knife attacks and drive cars into crowds at outdoor festivals, markets, political rallies, or pedestrian-clogged streets. Shortly thereafter, Abdul Razak Ali Artan rammed his car into passersby on the Ohio State University campus, then leaped out and stabbed others. U.S. officials subsequently said they believed that Artan was inspired by ISIS.

In its latest online issue, released this month, ISIS offers a new terror tactic. It calls on followers “in the lands of disbelief” to use sites such as Craigslist and eBay to lure victims to meetings where they can be seized as hostages. It suggests advertising jobs, property to rent, or online sales as a way to set up meetings in controlled spaces. The goal is not the traditional use of captives to demand ransom or prisoner swaps but, instead, to execute the hostages and taunt the enemy. It instructs, “In order for the operation to gain wide publicity and more effectively plant terror into the hearts of the disbelievers, one can keep some of his victims alive and restrained, making for a more lengthy and drawn out hostage scenario.”

“Just Terror Tactics,” now a recurring magazine feature, alternatively proposes mass hostage-taking scenarios in night clubs, movie theatres, shopping malls—any busy, enclosed area that “allows one to massacre them while using the building as a natural defense.”

ISIS is both expanding and contracting to survive, U.S. officials say. “ISIS is going back to its roots and using terrorist attacks to try to drive its message and ideology,” the State Department official told me. “It’s trying to maintain its influence and its ability to drive its ideology. It’s committing these attacks to show people that it can still do these operations and is still a relevant force. This fight is far from over.”

Al Qaeda is doing much the same. It released a new video this month, titled “A Lone Mujahid or an Enemy by Itself.” (A “mujahid” is a religious warrior.) It appeals to sympathizers in the West to carry out their own attacks. “My mujahid brother, we do not view you as an individual,” the narrator said. “We view you as a group, a brigade, or even an army in itself.” The narrator added, “Take it easy and simple, the same as our brother Omar Mateen,” who opened fire at a night club in Orlando last year and killed forty-nine people.

The physical disruption of the ISIS proto-state may increase the danger of lone-wolf attacks in the West, experts told me. Over the past three years, an estimated five thousand Europeans joined extremist movements in Syria and Iraq; about twenty per cent have returned to their home countries, according to Ali Soufan, a former F.B.I. agent and the author of a new book, “Anatomy of Terror: From the Death of bin Laden to the Rise of the Islamic State.” Up to eight hundred British citizens joined ISIS and the smaller extremist movements, a British official told me.

“Even if they do not go back to Europe, they can still inspire attacks, or ask friends and colleagues and family members to be involved in operations in Western societies,” Soufan told me.

The Manchester bombing is hauntingly similar to earlier attacks in Paris, Brussels, Nice, Berlin, London, and Madrid. Yet it stands out for the new questions it raises about ISIS. The investigation still has a long way to go—and the immediate threat may not be over. Britain upgraded to the highest terror alert late Monday, in anticipation of a possible second bombing. The ISIS claim had ended with an ominous warning: “What comes next will be more severe on the worshippers of the Cross and their allies, by Allah’s permission.”