Smoke rises from a oil refinery in Baiji, Iraq, in this picture taken through the windscreen of a car, June 19, 2014.
REUTERS/Stringer

KIRKUK, Iraq -- As militiamen affiliated with the Islamic State of Iraq and Syria attacked Iraq’s largest oil refinery in Baiji, locals in Iraqi Kurdistan are suffering from a lack of fuel, causing long lines at the gas pump and forcing several filling stations to shut down.

The Kurdish military, the peshmerga, seized the oil-rich lands around this city last week, taking advantage of the Iraqi army’s panicked flight in the face of the ISIS advance. Kurds have established a semi-autonomous state in northern Iraq since the 2003 U.S.-led invasion, but had ceded control of the multi-ethnic oil region around Kirkuk as part of an agreement with the Baghdad government brokered by the Americans.

Yet the region is less stable now in regard to oil than it was when the Iraqi military had control of it. Peshmerga officials here said they hoped the takeover of Kirkuk would let the Kurdish government control Iraq’s northern oil fields almost completely. But constant attacks by ISIS in rural villages around the city and the group’s siege of Baiji’s oil refinery, Iraq’s largest, threatens the peshmerga's hold on the region.

Cars at a gas station called “Filling Station City” outside of Kirkuk waited for more than two hours this week to fill their tanks. Attendants at the station said Wednesday that they only had enough gas to last one more day because of the fighting in the region and the massive influx of refugees.

Owners of stations in the area said they receive almost all of their oil from Baiji, but fighting there has cut that flow almost completely. ISIS moved to take over the refinery in Baiji earlier this week and clashes continued Thursday between the militant group and the Iraqi military. The fighting, which has so far killed more than 40, prompted several international oil companies to pull staff out of Iraq.

When ISIS attacked Kirkuk last week, Iraqi military forces fled, leaving room for the peshmerga to move in and take control of its oil-rich lands -- something the Kurdish Regional Government has wanted since the end of the U.S. military presence in Iraq in 2011.

Iraqi dictator Saddam Hussein implemented during his rule policies that systematically pushed ethnic Kurds out of the city and replaced them with Sunni Arab regime loyalists. Since the U.S.-led invasion began in 2003, the Kurdish people have made efforts to move back to the area to reclaim their lands. The peshmerga takeover of the city of Kirkuk last week was one giant step forward in achieving that goal.

Even before the takeover of Kirkuk, the Kurdish government for years enjoyed booming oil sales because of its partnership with Turkey and pipeline going from Kirkuk to the Turkish port of Ceyhan. Last week Turkey and Iraqi Kurdistan announced the sale of more than 1 million barrels of Kurdish oil to world markets via Ceyhan. Baghdad said the sale was "unauthorized."

But peshmerga officials here said their involvement in the fight is not about the oil. Rather, it is about holding on to the land that the Kurds had in the past, and defending the region for nationalistic reasons.

Yet the economic benefits of controlling Kirkuk are undeniable. By controlling the oil in Kirkuk, the KRG could potentially finance itself independently from Baghdad. But the Iraqi military is not willing to let Iraqi Kurdistan gain that freedom, and it launched several attacks on villages near Kirkuk after the peshmerga took over the area, in an attempt to regain the oil revenue Iraq lost.

ISIS poses a threat to both the Iraqi government and the peshmerga. If it gained control over large amounts of oil, the two sides would be at a significant loss economically. On Thursday afternoon ISIS hung its flag on the refinery in Baiji, and put armed men at the checkpoints around it. The Iraqi government, however, claimed it still held control of the refinery.

The lack of refined oil products in Kirkuk has not only caused long wait times at the pump, but it has driven prices up drastically. Young boys sell small canisters of fuel to cars as an alternative to waiting at the station. At the beginning of the week, a canister cost 5,000 Iraqi dinars or about $4.50; by Thursday the price had shot up to about 35,000 dinars or $31.