Eliminating the elusive leader of so-called Islamic State has given US president Donald Trump a new argument for leaving Syria, but the American military campaign against the extremists is far from finished.

The killing of Abu Bakr al-Baghdadi by US forces leaves IS without an obvious leader, a major setback for an organisation that in March was forced by American troops and Kurdish forces out of the last portion of its self-declared “caliphate”, which once spanned a swathe of Iraq and Syria.

Mr Trump said that US special forces involved in the raid on a compound in north-western Syria had gathered “highly sensitive” material about IS, including information about its future plans. But the militant group, which arose from the remnants of al Qaida in Iraq after that group’s defeat by US-led forces in 2008, remains a dangerous threat in Iraq, Afghanistan and beyond.

Chris Costa, a former senior director for counter-terrorism for the National Security Council in the Trump administration, said: “The bottom line is: This puts the enemy on its heels, but the ideology – and this sounds so cliched – is not dead.”

Key to IS is its “kill where you are” ethos, encouraging a far-flung network of followers, including those in the United States, to commit violence however and wherever they can.

That jihadist message is likely to live on, even with the death of al-Baghdadi.

That means US forces, perhaps in reduced numbers, will continue hunting and attacking key IS targets, even as Mr Trump says he is committed to a 2016 campaign pledge to bring them home and end “endless wars” started under his predecessors.

Mr Trump earlier this month went from declaring a near-complete withdrawal of US forces from Syria to deciding that some – perhaps several hundred – must stay to keep eastern Syria’s oil fields from falling back into the hands of IS.

Mr Trump also agreed to keep about 150 US troops at a base in southern Syria.

In announcing on Sunday that al-Baghdadi had blown himself up after being cornered in a dead-end underground tunnel in Syria, Mr Trump acknowledged that IS, which he often calls “100 per cent” defeated, still has ambitions to make a comeback.

The group is “very, very strongly looking to build it again,” he said.

This, he said, explains why al-Baghdadi was in the Idlib province of north-western Syria, an area largely controlled by a rival group - the al Qaida-linked Hayat Tahrir al-Sham - although other jihadi groups sympathetic to IS are also there.

“Well, that’s where he was trying to rebuild from because that was the place that made most sense, if you’re looking to rebuild,” Mr Trump said.

Mr Trump suggested that other countries, including Russia, should carry on the fight against IS, but there is no indication that US forces will abandon the mission any time soon.

“Our job is to stay on top of that and to make sure that we continue to take out their leadership,” US defence secretary Mark Esper said on ABC’s This Week.

Mike Rogers, the ranking Republican on the House Homeland Security Committee in US congress, said five years of US and coalition efforts inside Syria have not eliminated the IS threat.

He said: “While the death of its leader is a tremendous blow for the group, about 10,000 Isis fighters remain in the region and will continue to carry out guerrilla attacks and seek new territory.”

According to defence officials in Iraq and Afghanistan who study IS and have watched its movements, the group is growing in power and numbers outside of Syria.

Its flagship affiliate is known as Isis-Khorasan in Afghanistan, and it is expanding into other countries, including Pakistan, Tajikistan, Iran, India, Bangladesh and Indonesia.

Many of those affiliates have links with the terror group’s hub in eastern Afghanistan.

In addition to conducting high-profile attacks inside Afghanistan, officials said IS has also already proven its ability to inspire and enable terrorist attacks outside Afghanistan, including a deadly event in Sweden. It is this global reach that makes IS a continuing worry.Al-Baghdadi served as a direct inspiration for extremists in the United States, where multiple jihadists in the last five years invoked his name as they carried out deadly acts of violence.

Omar Mateen, the gunman who in 2016 killed 49 people inside a Florida nightclub, pledged allegiance to al-Baghdadi during a 911 call in which he identified himself as an Islamic soldier.

Months earlier, Tashfeen Malik, who along with her husband killed 14 people in San Bernardino, California, took to Facebook after her massacre was already under way to declare her support for al-Baghdadi.

The death of al-Baghdadi leaves the group without a high-profile successor and deprives would-be jihadists of a figurehead leader to rally behind.

Counter-terrorism experts say that leadership void is a significant loss for a terror group that had lost the vast stretches of the physical caliphate in Syria and Iraq it had once controlled.

But they also caution that they expect the group’s ideology to endure beyond al-Baghdadi.