ISIS fighters and pro-goverment forces battled for a year over control of the oil refinery at Baiji, Iraq's largest. The plant was crippled but intact, and would have been a key asset for whomever came to control all of the refinery and the pipelines in and out of it. This weekend, ISIS forces, which had controlled much of the facility since April, suddenly retreated. And torched the place on their way out.

On Sunday, this video attributed to the ISIS news agency Amaq showed the Baiji refinery in flames.

"Many of the ISIS forces seem to have withdrawn," says Ben van Heuvelen of Iraq Oil Report. "But they've left behind a crew that appears to be on a suicide mission to cause as much damage and death as possible while the Iraqi forces try to clear the place." Van Heuvelen's sources on the ground report that ISIS militants inside the plant have detonated explosives and set fire to key infrastructure, including control rooms and processing units.

The sabotage occurred just as pro-government forces secured key roads to the refinery and launched fresh attacks on ISIS defenses.

When the Baiji refinery was operational, it processed more than 200,000 barrels per day of crude, "which," says van Heuvelen, "amounted to more than one-third of Iraq's total domestic fuel production." Iraqi authorities took the facility offline in June 2014 when ISIS forces first seized great swaths of northern Iraq, including oil fields and pipelines critical to the Baiji operation. With ISIS essentially surrounding the refinery, the pro-government forces had to struggle to keep fighters out.

"Now," says van Heuvelen, "the refinery is probably unusable for several years, if ever again." Iraqi officials might have seen this coming.

"They definitely planned poorly," van Heuvelen observes. "One problem is that they did not devote nearly enough troops to guarding one of the most critical pieces of infrastructure in the country. Another problem is when they realized that ISIS was launching this overwhelming attack on the refinery, they responded without any coherent strategy. So they sent in reinforcements without securing the supply routes between the refinery and the territory that the Iraqi government controlled. As a result, those reinforcements essentially walked into an ambush, and many of them got killed."