They’re bitter enemies on the battlefield, but the Islamic State group and the Syrian government are willing partners in the marketplace. ISIS is trading oil from land it has seized in Syria to Syrian President Bashar Assad’s government for cash, according to a BBC documentary scheduled to air Wednesday night.

“There’s a business opportunity, there’s a need for both of them,” Danny Glazer, the assistant secretary for terrorist financing at the U.S. Treasury Department, says in the BBC2 documentary, “World’s Richest Terror Army,” according to a story published Wednesday in the Guardian before the film airs. “The Assad regime needs the oil, ISIS needs the cash and they’re willing to do business even as they’re fighting each other.”

The documentary claims ISIS has about $2 billion in its coffers, mainly through oil from the fields it has seized in Syria. The Islamic militant group also controls territory in neighboring Iraq. ISIS also gets funding by skimming money intended to go to government officials in Mosul, the second-largest city in Iraq that the group seized last summer. The government money is first transported to Kirkuk in Kurdistan, the autonomous region in northern Iraq.

“That’s the way the money is moved because there’s no checks. It’s cash,” said Ashti Hawrami, natural resources minister for the Kurdistan regional government, according to the Guardian. “It’s easy money. It’s God’s gift. Cash in their hand.”

Much of the oil being sold by ISIS goes to Assad’s government, Glaser said. Sometimes the gas isn’t just sold for cash. For instance, the Islamic State group may trade oil for power supplies, the Guardian reported. The British newspaper said the Syrian government denies it trades with ISIS.

The Syrian government is battling ISIS and other groups, including moderate Syrian rebels, in a civil war that has ravaged the Middle Eastern nation for four years.