Thousands of foreign ISIL supporters have returned to their home countries after leaving Syria and Iraq over the past two years, a US-based security analysis group has said.

At least 5,600 people from 33 countries left ISIL-held areas in that period, with numbers increasing as the group began to suffer territorial losses, the Soufan Center said in a report published on Tuesday.

The figure, based on official government records, included women and children, Jeffrey Ringel, a director at the Soufan Center, told Al Jazeera.

More than 40,000 foreigners from 100 countries joined ISIL (the Islamic State of Iraq and the Levant, also known as ISIS) before and after the group declared the establishment of a "caliphate" in 2014 after seizing large swaths of territory in both Syria and Iraq.

Thousands have been killed on the battlefield as Syrian and Iraqi forces captured major strongholds and urban centres, leaving ISIL only in control of a sliver of land along the Euphrates on the Syria and Iraq border.

ISIL's self-proclaimed capital in Syria, Raqqa, fell to the US-backed Syrian Democratic Forces earlier this month. In June, Iraqi forces expelled the group's fighters from Mosul, Iraq's second-biggest city.

ISIL returnees present a "huge challenge" for law enforcement agencies as many countries were not prepared to address the issue, the Soufan Center said.

But those returning have "not as yet added significantly to the threat of terrorism around the world", it said.

"The concern here is the returnees may continue their fight after they return to their ancestral lands," Ringel told Al Jazeera.

"This is still unknown, but there is a good chance they will. As the caliphate crumbles, they may also move to new areas, such as Southeast Asia and Africa."

The influence or involvement of foreign fighters in attacks claimed by ISIL across the world has also been limited, the report said.

The highest numbers of those moving to ISIL-held territories in Syria and Iraq came from Russia and Saudi Arabia, with 3,417 and 3,244 people, respectively.

Ten percent of the Russians went back, while Saudi Arabia reported the return of 760 people.

In the European Union, more than 5,000 people travelled to Syria and Iraq. Of them, more than 1,200 came back, the report said.

Turkey and Tunisia reported the highest number of returnees at 900 and 800 people, respectively.

State response

There is disagreement among security experts over the threat returnees may pose to their home countries, the Soufan Center said, as the extent to which they "will wish to regroup, resurge, recruit and recreate what they have lost, is as yet unknown".

However, the "push and pull factors that attracted foreigners in such unprecedented numbers remain," it warned, adding that ISIL or something similar to it will survive "as long as the conditions that promoted its growth remain".

{articleGUID}

ISIL's leadership will look to supporters overseas as it suffers territorial losses, and returnees may be particularly vulnerable to appeals from their ex-comrades, the report said.

Most countries have responded to the perceived threat by imprisoning returnees, it said, adding the policy is one that "only postpones the problem".

"Allocating more resources to security is not always the answer," it cautioned, adding that increased surveillance "may be more likely to increase terrorism than to reduce it".

Softer approaches such as rehabilitation and reintegration programmes are "notoriously hard to design and run" and the majority of such efforts have stuttered or come to a halt, it said.

Ringel said governments should recognise that ISIL supporters who travelled to Syria and Iraq had differing motives and tailor responses accordingly.

"There are different levels of people who are returning. If someone went there to fight and kill, and committed crimes, they should be treated as a criminal. But the approach must be different if it's a woman whose spouse had dragged her there or children who were born there."

Governments must set proper mental health and social support mechanisms for women and child returnees, he added.

More research and information sharing among countries was needed to tackle the issue, the Soufan Center said.

Other security analysts have also called on states to adopt a mix of measures in dealing with returning foreign fighters.

Experts at the Global Counterterrorism Forum, an informal forum of 29 countries and the European Union, have recommended a range of interventions that cover the "full life cycle of radicalisation" which include prosecution, rehabilitation and prevention measures.