Jim Michaels

USA TODAY

The terrorist attack in Bangladesh Friday highlights the resiliency of the Islamic State and its ability to pull off high-profile assaults around the world, despite losing territory in Iraq and Syria.

The terror attacks like the one in Bangladesh and earlier this week in Istanbul show that the group has established cells around the world — and is still capable of deadly attacks.

“ISIS has tens of thousands of individuals that are scattered not just in the Middle East but also to West Africa, to Southeast Asia, and beyond,” CIA Director John Brennan told the Council on Foreign Relations this week, referring to the Islamic State by an acronym.

In the latest terror attack, the Islamic State claimed responsibility for a hostage takeover at a restaurant popular with foreigners in Dhaka, the capital of Bangladesh. Police officials stormed the cafe Saturday morning, killing six assailants and rescuing 13 captives. At least 20 hostages were killed during the 10-hour standoff.

The Islamic State has established a presence in Bangladesh, a predominately Muslim country, as it has in other parts of the world, said Patrick Johnston, a terrorism analyst at Rand Corp. The group has been able to build its presence in places like Bangladesh by exploiting local grievances and weak governments, Johnston said. Religious extremism has been increasing in the country, raising government concerns.

Religious extremists in Bangladesh are behind a rash of recent attacks against bloggers and activists who promoted a more tolerant and secular worldview.

The Islamic State’s presence in other parts of Asia has also been growing in recent years, though its presence in the Middle East is larger. The Islamic State commands about 6,000 fighters in Libya.

The global presence has allowed the Islamic State to shift its strategy toward more traditional terror attacks in response to battlefield defeats in Iraq and Syria. When the Islamic State first emerged in Syria and Iraq two years ago, it distinguished itself from other terror groups by holding territory and attempting to govern it. It also commanded a more visible army that was vulnerable to U.S.-led coalition airstrikes.

The airstrikes and ground offensives by Iraqi armed forces and Syrian opposition forces have taken a toll on the Islamic State in Iraq and Syria. In Iraq, the terror group has lost 45% of the territory it held at its peak last year. In Syria it has lost about 20% of the territory it once held.

The U.S.-led coalition’s air campaign has killed a number of top Islamic State leaders. On Friday the Pentagon announced a June 25 airstrike near Mosul killed two senior Islamic State military commanders.

The strike killed Basim Muhammad Ahmad Sultan al-Bajari, the Islamic State’s deputy minister of war, and Hatim Talib al-Hamduni, a militant commander in Mosul, Iraq’s second-largest city.

But the progress in pushing the organization out of territory has not yet undermined its ability to export terror, officials said.

“I am still very concerned that the ISIL-generated engine of foreign terrorism outside of Syria and Iraq still has a lot of momentum,” Brennan said.