The shutdown of Iraq's biggest refinery, roads blocked by fighting, and skyrocketing demand have created the worst oil crisis in years in the country's autonomous Kurdish region.
At petrol stations across the three provinces of the northern region, but particularly in and around the city of Dohuk and the Kurdish regional capital Arbil, lines extend for hours, sometimes even days.
"I've been here for two hours, and I'm hoping I'll be able to fill up in about another half hour," said 34-year-old engineer Raad, who was queueing in Arbil.
He is even lucky to have found a station with gasoline in the city.
Many have shut down after running out, blocking entrances and exits with plastic chairs to keep out hopeful customers.
The crisis began shortly after Sunni militants, led by jihadists from the Islamic State of Iraq and the Levant, launched a lightning offensive that has overrun major parts of five Iraqi provinces.
As the militants advanced, supply routes were cut and fighting led to a shutdown of the country's largest oil refinery near the town of Baiji, south of the militant-held city of Mosul.
The crisis is a "perfect storm of supply and demand problems," said Patrick Osgood, the Kurdistan bureau chief for Iraq Oil Report.
"On the supply side, the Kurdistan region isn't entirely self-sufficient on refined products including gasoline," he said.
"It probably produces 60 percent of its demand, but 40 percent it was getting from Baiji."
On the demand side, there has been panic-buying, he said, but also shortages because petrol has been diverted to the city of Kirkuk.
Long disputed between the Iraqi federal government and the regional Kurdish authorities, Kirkuk is now being protected by Kurdish peshmerga forces ringed around it after Iraqi army troops abandoned their posts during the militant onslaught.
Osgood said after the peshmerga forces moved in, the Kurdish government began routing petrol from one of two refineries in the Kurdish north to Kirkuk, creating shortages in Arbil and elsewhere.
- Black market booming -
The crisis has also been exacerbated by a burgeoning black market and rationing imposed by the Kurdish government.
Signup to our newsletter and follow us on Facebook and Twitter!
Outside the city of Dohuk, on the road to Mosul, dozens of young men call out to drivers as they pass.
"We have petrol, we have petrol!" they shout, some holding syphons in their hands.
The gasoline on offer is stored in plastic water containers lined up on the side of the road and costs four time as much as the official price in Kurdish territory of 500 Iraqi dinars (40 US cents) a litre.
Most people cannot afford to spend that much and those who can say they avoid it because they fear it has been adulterated and will ruin their cars.
The Kurdish government is allotting days for cars to fill up depending on their licence plate number and is also limited the amount customers can buy to 30 litres at a time.
This has not prevented people from filling up and then selling the petrol.
"There shouldn't even be a petrol crisis," 63-year-old Abdulkarim Othman said angrily as he stared at the line in front of him.
"If everyone only came and filled up once, instead of coming several times and selling it in Kirkuk and Mosul, there wouldn't be a crisis."
"This is a crisis that the people have created, not the government."
In Arbil, some say they are angry with the regional government for failing to set aside reserves to forestall such a crisis.
Many also direct their anger at the federal government in Baghdad, accusing it of withholding petrol from elsewhere in the country.
But Osgood said without the Baiji refinery, there simply is not enough petrol to go around.
"There's no plan B in terms of supply within Iraq," he said.
"Even before this crisis, Iraq was a net importer of gasoline."
Neighbouring Turkey has offered to send petrol to Kurdistan but it would cost double the subsidised 500-dinar rate even at wholesale prices, Osgood said.
Another alternative is to bring petrol in from Tajikistan, Turkmenistan and Azerbaijan, but setting up those supply chains will take time.
"This problem isn't going away anytime soon," Osgood said.