In North Africa, Libya is believed to be home to between 3,000 and 4,000 ISIS militants and is believed to be experiencing a revival in al-Qaeda presence.
Al-Qaeda’s leaders in Iran “have grown more prominent” and have been working with the extremist group’s top leader, Ayman al-Zawahri, “projecting his authority more effectively than he could previously” including on events in Syria, UN experts said.
Egypt is also believed to have some 1,000 ISIS fighters.
The news comes despite the armed group’s defeat on most fronts and following a significant halt in the flow of foreigners joining its ranks.
According to the UN experts, the heightened terrorist presence is despite both ISIS and al-Qaeda suffering major losses.
The UN report, which was released on Monday, analysed ISIS and al-Qaeda presence across the world, including in Southeast Asia, Central and South Asia, Europe, East Africa, North Africa and the Arabian Peninsula.
The US-led coalition against ISIS claimed last December there were fewer than 1,000 militants remaining in Iraq and Syria and the group was on the brink of defeat.
However, the UN report stated total ISIS membership in Iraq and Syria was “between 20,000 and 30,000 individuals, roughly equally distributed between the two countries”.
The report said: “Among these is still a significant component of the many thousands of active foreign terrorist fighters.”
It added: “Despite the damage to bureaucratic structures of the so-called ‘caliphate,’ the collective discipline of ISIS is intact.
“Although he is reported to have been injured, Abu Bakr al-Baghdadi remains in authority.”
The report by UN experts also revealed that despite the defeat of ISIS in Iraq and most of Syria, it was likely that a reduced “covert version” of the militant group’s “core” would survive in both countries, with significant affiliated supporters in Afghanistan, Libya, Southeast Asia and West Africa.
At the height of its reign in 2015, ISIS boasted as many as 100,000 jihadists in its ranks, controlling territory spanning Syria and neighbouring Iraq roughly half the size the UK.
Its remaining members are now confined to a tiny sliver of land between the Syria-Iraq border.
The group upholds control of small pockets of territory in central and southern Syria, having been deterred by US-backed local forces.
Thomas Joscelyn, a senior fellow at the Foundation for Defence of Democracies, believes the coalition vastly underestimated the number of fighters ISIS had at its peak, and therefore the calculations about how many militants remain are too low.
Speaking to The Daily Telegraph, he said: “The Islamic State likely retains a hardened cadre of fighters who have survived the group’s many battles.”
To date, the US has spent $14.3 billion (£11.2 billion) on more than 24,000 airstrikes to destroy ISIS in Iraq and Syria, killing some 50,000 jihadists in the battlefield.
Mr Joscelyn said: “There is that danger, especially as ISIS is conducting daily attacks in Iraq and Syria, the group hasn’t been defeated.
“ISIS knew it was going to lose its territorial caliphate and its leaders took steps to continue fighting as insurgents.”