Thick plumes of toxic fumes on Tuesday were still rising from burning oil wells in Qayara, set alight by ISIS militants as they retreated.

For months, residents of the Iraqi town have lived in darkness, but in recent days, oil workers and firefighters have put out the blazes closest to the populated center.

The work is far from complete. Eight burning wells have been extinguished in recent weeks, Oil Ministry spokesman Assem Jihad said, adding that most of them were located near homes.

The area's 54 wells once pumped nearly 10,000 barrels a day before ISIS fighters took the fields in their June 2014 onslaught when they seized a third of Iraq's territory.

At one field, bulldozers drove earth over burning ground at several sites on the town's outskirts, attempting to smother the flames. But with each push of the shovel, the black crude flowed in a new stream.

Employees from the Iraqi Northern Oil company have been using a mix of water and ground to extinguish the fires.

Strong winds added to the challenge.

Last week, the United Nations warned that the toxic smoke, which also emitting from a nearby Sulfur Gas Factory, will have a mid and long-term effect on the residents' health, the environment and livelihoods. Over 1,500 people sought medical treatment for respiratory problems.