WASHINGTON — In Germany and France, the authorities thwarted terrorists’ plots to attack with the deadly poison ricin. In eastern Syria, the Islamic State continued its retreat under stepped-up assaults by Kurdish militia and Iraqi pilots. And extremists in Yemen, Somalia and Libya were targeted by American airstrikes.

That spate of action, over the past few weeks alone, illustrates the shifting and enduring threat from Islamic extremism around the world that will last long after the Islamic State, also known as ISIS, is defeated on the battlefield.

From the scheming of lone extremists with no apparent connections to terrorist groups, like the ricin plots, to fighters aligned with the Islamic State or Al Qaeda in more than two dozen countries, terrorist threats are as complex and diverse as ever, American and other Western intelligence officials said in interviews.

The Islamic State, in particular, is adapting to setbacks and increasingly using the tools of globalization — including Bitcoin and encrypted communications — to take their fight underground and rally adherents around the world.