The number of foreign fighters travelling to Iraq and Syria to join the Islamic State (Isis) has gone down to nearly zero as the terror group is progressively losing territories and combatants, US officials have said.

When Isis emerged in 2014, it swept across Iraq and Syria and seized numerous territories and key cities. Mosul in Iraq and Raqqa in Syria became the capitals of its self-declared Caliphate.

In its pursuit to expand its dominion, the group called on fellow Muslim men and women around the world to join their fight, leading to thousands of "foreign fighters" travelling to the Middle East and living inside the captured towns and cities under its administration.

However, the group has lost both of its key strongholds this year, and only a handful of militants remain in the now liberated areas.

"Overall, Isis is losing in every way. We've devastated their networks, targeted and eliminated their leaders at all levels," said Colonel Ryan Dillon, spokesman for Operation Inherent Resolve (OIR), the US-led coalition against Isis.

"We've degraded their ability to finance their operations, cutting oil revenues by 90%. Their flow of foreign recruits has gone from about 1,500 fighters a month down to near zero today. Their story of leading a holy cause was really a cesspool of brutal lies, torture and oppression," he continued.

He added that an estimated 6,500 Isis fighters remain in Iraq and Syria. Of these, about 100 are thought to be in Raqqa, which was declared liberated from Isis on 17 October, after months of intense fighting.

"Isis in Iraq and Syria are all but isolated in their quickly shrinking territory," Dillon said. "Today in Syria, Isis is losing its grip. After more than four months of operations, Raqqa is more than 90% cleared."

When Isis emerged in 2014, the number of its fighters varied from between 200,000 (as per estimates by Kurdish leaders) and 31,500 (according to the US intelligence agency CIA).

In early 2016, the CIA estimated the number of Isis fighters to be between 20,000 and 25,000. The figure further shrank to 15,000 a few months later, according to AP, quoting US officials.

A convoy of Syrian Isis fighters quit Raqqa on 15 October. Foreign fighters were barred from leaving the city with the surrendering local Isis militants as part of a deal between local officials and tribesmen.

Thousands of civilians have also fled since the offensive to recapture Raqqa began in June 2017. In another major blow against the militants, Iraqi troops aided by a foreign coalition recaptured Mosul this summer.

Raqqa liberated
A member of the Syrian Democratic Forces looks out from a building at the frontline in Raqqa as the fight against Isis nears the end Bulent Kilic/AFP