LONDON — ISIS has seen its income drop by 80 percent in two years as it loses territory and the oil and tax revenue that comes with it, according to a study of its finances.

The self-declared caliphate has seen average monthly income plunge from $81 million in the second quarter of 2015 to just $16 million in the same period this year, according to IHS Markit, a global data-monitoring company.

The report came as Iraq declared victory over the terror group in Iraq after government forces recaptured a key mosque in the former ISIS stronghold of Mosul on Thursday.

In Syria, rebel forces have advanced into the outskirts of ISIS-held Raqqa while government forces backed by U.S.-led airstrikes are threatening to dislodge its positions near Deir al-Zour.

Shrinking territory is a big problem for the militant extremist group. Unlike other terror networks such as al Qaeda, ISIS regards itself as a state, running sharia courts, schools and even its own currency. It has been meeting the high cost of this apparatus by seizing assets such as oil refineries and imposing taxes and fines in the areas it controls.

ISIS’ self-declared caliphate last week spanned an estimated 13,980 square miles — roughly the size of Maryland — according to IHS Markit. That’s 40 percent smaller than at the start of the year, and 60 percent less than in January 2015, when it covered an estimated 35,060 square miles.

"ISIS as we’ve known it is looking very much on the way out, but something else could replace it"

“Territorial losses are the main factor contributing to ISIS’ loss of revenue,” said Ludovico Carlino, senior Middle East analyst at IHS Markit. “Losing control of the heavily populated Iraqi city of Mosul, and oil rich areas in the Syrian provinces of Raqqa and Homs, has had a particularly significant impact on the group’s ability to generate revenue.”

While the Iraqi government appears assured of its victory in Mosul, there is still fighting in areas of the city populated by civilians. Between 15,000 and 20,000 noncombatants are trapped in the Old Mosul neighborhood, which still needs to be cleared, according to Joint Operation Command spokesman Brigadier General Yahya Rasool.

Iraqi forces stand in the rubble of a building as they advance towards Mosul's Old City on June 18. Ahmad Al-Rubaye / AFP - Getty Images

Still, IHS Markit's findings echo a similar report published in February by the International Centre for the Study of Radicalisation and Political Violence (ICSR) at King’s College, London, which said ISIS’ income had dropped by more than half from an estimated $1.9 billion in 2014 to $870 million last year.

David Butter, an associate fellow at the U.K. think tank Chatham House, said ISIS had developed various ways to extract money from its enclaves — but all were ultimately dependent on controlling territory, so imperiled by the recent sweeping battlefield losses.

“When it really came to the fore in July 2014, it had already developed financing streams within Iraq from protection money and from under-the-radar taxation,” he told NBC News. “There was a very broad tax base on farmers and traders … anything that moved would be taxed, and even things that didn’t move.

“However, its longer-term model depended on controlling assets and territory that it could tax or derive revenue from and that’s slipping away from them," he said.

Airstrikes have also disabled many of the oil facilities that had fallen into militant hands.

IHS Markit said it was not just oil and tax revenue that was in decline for ISIS, but also income from smuggling, confiscation and other illicit activities — forcing it to concentrate on finding money for its fighting forces.

Related: ISIS Leader Who Approved Sex Slaves Killed by U.S. Airstrike

“Although ISIS still appears to be involved in some commercial activity, especially oil production, there are indications that it is attempting to increase its financial 'reserves,' accelerating the shift from a bureaucratic and centralized quasi-state economy towards funding a future insurgency through a real war-economy,” said IHS Markit’s Carlino.

“An attempt to force people living in the caliphate to pay all transactions with the Golden Dinar — the group’s currency announced last year — is the most evident indicator of this trend.”

Eckart Woertz, senior research fellow at CIDOB (Barcelona Center for International Affairs) in Spain, said the militants were even losing out on money from agriculture as it lost control of farming areas in northeast Syria.

An Iraqi soldier stands inside a compound ISIS used as a prison in Mosul. Alkis Konstantinidis / Reuters

“Agriculture is not an unimportant source of income for them,” he told NBC News.

Woertz explained that ISIS had previously been able to seize the wages of civil servants who lived in militant-held zones but were still being paid government wages. However, Iraq had ended the practice of paying wages into ISIS-controlled areas, cutting off a revenue stream to the militants.

“It is also not a winning brand anymore,” Woertz said. “When it was gaining control of areas it had an image of invincibility for a little while — or was able to project that image on social media — but now it is a losing brand” that attracts less overseas support in the form of donations.

Related: U.S. Fears New Threat From ISIS Drones

“As far as they want to be a state, they have failed, or are about to fail,” Woertz said.

However, despite ISIS's "caliphate" project appearing increasingly unsustainable, experts warned that conditions in the region were still ripe for Islamist violence.

"A great deal will depend on effective governance in areas [liberated from ISIS]," said Butter of Chatham House. "But it is still quite a mess. There are a lot of people pushing ISIS-style ideology and they may find some receptiveness in Iraq if the country continues to be governed in the way it has been.

"ISIS as we’ve known it is looking very much on the way out, but something else could replace it," he added. "The ideology behind it is quite virulent.”