BEIRUT — Three years ago, a black-clad cleric named Abu Bakr al-Baghdadi ascended a mosque pulpit in the Iraqi city of Mosul and addressed the world as leader of a new terrorist state.
The announcement of the caliphate was a high point for the extremist fighters of the Islamic State.
Their exhibitionist violence and apocalyptic ideology helped them seize vast stretches of territory in Syria and Iraq, attract legions of foreign fighters, and create an administration with bureaucrats, courts, and oil wells.
Now, their state is crumbling.
In Syria, US-backed militias have surrounded Raqqa, the group’s capital, and breached its historic walls.
Across the border, Iraqi forces have seized the remains of the Mosul mosque where Baghdadi appeared and besieged the remaining jihadis in a shrinking number of city blocks.
But the loss of its two largest cities will not spell a final defeat for the Islamic State — also known as ISIS, ISIL, and Daesh — according to analysts and US and Middle Eastern officials.
The group has already shifted back to its roots as an insurgent force, but one that now has an international reach and an ideology that continues to motivate attackers around the world.
“These are obviously major blows to ISIS, because its state-building project is over, there is no more caliphate, and that will diminish support and recruits,’’ said Hassan Hassan, a senior fellow at the Tahrir Institute for Middle East Policy in Washington and a co-author of a book on the group. “But ISIS today is an international organization. Its leadership and its ability to grow back are still there.’’
The Islamic State has overshadowed its jihadi precursors like Al Qaeda by not just holding territory, but by running cities and their hinterlands for an extended period, winning the group credibility in the militant world and allowing it to build a complex organization.
So even while its physical hold slips, its surviving cadres — middle managers, weapons technicians, propagandists, and other operatives — will invest that experience in the group’s future operations.
And even though its hold on crucial urban centers is being shaken, the Islamic State is in no way homeless yet.
In Iraq, the group still controls Tal Afar, Hawija, other towns and much of Anbar province.
In Syria, most of its top operatives have fled Raqqa in the past six months for other towns still under ISIS control in the Euphrates River valley, according to US and Western military and counter-terrorism officials who have received intelligence briefings.
Many have relocated to Mayadeen, a town 110 miles southeast of Raqqa near oil facilities and with supply lines through the surrounding desert.
They have taken with them the group’s most important recruiting, financing, propaganda, and external operations functions, US officials said. Other leaders have been spirited out of Raqqa by a trusted network of aides to a string of towns from Deir el-Zour to Abu Kamal.
US Special Operations forces have targeted this area with armed Reaper drones and attack planes, disrupting and damaging the Islamic State’s leadership and ability to carry out plots. But the battle for Raqqa could last many months.
It is all a new chapter in the history of a group whose roots go back to the US invasion of Iraq in 2003.
Fighting under various names and leaders, the Sunni militants who would evolve into the Islamic State killed many Iraqis and US troops before Sunni tribal fighters paid by the United States decimated them, driving the survivors underground by the time the United States withdrew from Iraq in 2011.
But new conflicts provided new opportunities.
After the outbreak of the civil war in Syria in 2011, the group dispatched operatives there to build the force that later seized the country’s east, including Raqqa, which became its administrative capital.
Then it turned its sights back to Iraq, seizing Mosul in 2014, where Baghdadi made clear what distinguished his followers from Al Qaeda: They were not just insurgents, but also the founders of a state infused with extremist ideology.
Now, senior US intelligence and counterterrorism officials say that 60,000 Islamic State fighters have been killed since June 2014, including much of the group’s leadership, and that the group has lost about two-thirds of its peak territory.
Despite this, the Islamic State has carried out nearly 1,500 attacks in 16 cities across Iraq and Syria after they were freed from the militants’ control, showing that the group has reverted to its insurgent roots and foreshadowing long-term security threats, according to a study also published by the West Point center.
Internationally, the Islamic State has partly compensated for its losses at home by encouraging affiliates abroad — in Libya, Egypt, Yemen, Afghanistan, Nigeria, and the Philippines — and by activating operatives elsewhere.
Between 100 and 250 ideologically driven foreigners are thought to have been smuggled into Europe from late 2014 to mid-2016, nearly all through Turkey.