A man takes a photograph of his friend as thick smoke rises from a fire that broke out at oil wells set ablaze by Islamic State group militants before they fled the oil-producing region of Qayyara, Iraq, Jan. 28,2017. Reuters

The Iraqi army and its allies have blocked nearly all access by the Islamic State group, also known as ISIS, to lucrative oil fields, cutting off one of the jihadists' primary sources of funding, the U.S. military magazine Stars and Stripes reports.

ISIS took large swathes of territory across Iraq in 2014 and declared itself a global caliphate from the city of Mosul, the largest and now last remaining city under the group's control in Iraq. The Iraqi military, backed by the U.S., Kurdish forces and Iran-backed Shiite Muslim militias have reversed the militants' gains nationwide and begun a major military operation to take back Mosul. In doing so, they have severed major supply routes connecting ISIS' territory to Iraq's oil fields and refineries that helped fund the group's power structures. An unnamed Pentagon official said this would make ISIS rely on sites still under its control in areas of neighboring Syria.

Read: Where Is ISIS Leader Abu Bakr al-Baghdadi?

“They are largely denied access to oil and gas in Iraq at this point, and so certainly the most fertile oil and gas fields are probably in Deir el-Zour province,” the official told U.S. military magazine Stars and Stripes Wednesday. “There are still some oil and gas fields in the vicinity of Palmyra ... that they still have access too.”

“Their largest cash revenue is still an ability to extract oil and gas and to refine and sell it,” the official added, noting ISIS still makes money from taxes within its shrinking territories and by exploiting sizeable cash reserves seized from banks and other institutions.

In 2015, ISIS was estimated to be making at least $1 million to $1.5 million a day on the sale of oil through shady networks that often masked the true supplier. Recent advances by the Russia-backed Syrian army, the U.S.-backed Syrian Democratic Forces and Turkey-backed Syrian rebels have threatened the remainder of ISIS' oil network in Syria. An Iraqi military commander told reporters Thursday that Iraqi forces would oust ISIS from their last bastion of control in western Mosul within a month.

Read: Iraq Nearly Defeats ISIS As US, Russia Team Up Against Turkey

ISIS originated as hardline Sunni Muslim militant group al-Qaeda in Iraq after the U.S. invasion and overthrow of President Saddam Hussein in 2003. It gained influence through a deadly campaign targeting U.S. soldiers and the local Shiite Muslim community. The ultraconservative militants renamed themselves the Islamic State of Iraq and eventually became known as ISIS after taking advantage of the 2011 insurgency against Syrian President Bashar Assad and expanding westward through infiltrating the ranks of the Syrian opposition. Since facing international coalitions in both countries, however, ISIS has lost a significant amount of its territory and, after its anticipated loss in Mosul, ISIS' adversaries are planning to move against the group's de facto capital of Raqqa in northern Syria.