Menacing black smoke hangs over the town of al-Qayyara. The air here is poison.

Children with blackened hands and soot-stained faces play beneath the toxic plumes. The early afternoon sun is so eclipsed by the haze that day seems like endless twilight.

The dark filth coating the landscape and choking residents lungs comes from oil wells sabotaged and set alight by ISIS in August.

Engineers and firefighters have been battling the flames for 100 days now. When CNN first visited al-Qayyara back in early October, they had tackled six fires with nine to go. But the real extent of the damage had yet to be determined.

Now there are 19 burning wells, three of which have been sealed. Turning them all off is expected to take months and cost millions of dollars in lost oil revenue.

Families live beneath the towering columns of smoke and it is unclear how this toxic legacy left by ISIS will affect their health.

Its suspected the terror group damaged the oil field to create a smoke screen as Iraqi forces battled to push them out of al-Qayyara, about 35 miles south of Mosul. It is a devastating example of the groups scorched earth policy.

"ISIS, these terrorists, did this," Itkhlaf Mohammed, a lead engineer working to cap the wells says. "They did it to provide themselves with cover from airplanes and at the same time to ruin and take revenge on the area."

A colossal challenge

Firefighters, engineers, and oil workers must battle unimaginable conditions to contain these fires and extinguish the blazing oil wells.

The heat is so high that it has melted much of the ground close to the wells. The air is thick and foul and tastes terrible. The smoke makes your eyes water.

As ISIS retreated from this territory, it set sabotaged local oil fields.

Dozens of men work long days at these sites but few wear gas masks. Some wrap their faces with scarves.

The process of containing the fires and capping the wells can take anywhere between two days and two months depending on the extent of the damage caused by ISIS militants.

"This is a very complicated process. You cant just put out the fire with water," Mohammed says. "You have to actually reach the head of the well and control it. And this is very difficult and also dangerous."

Locals nearby have been forced to live and breathe noxious gas for months.

First, earth-moving equipment is used to contain the fire and channel the oil flow away from peoples homes.

Then workers dig down through the flames, while trying to keep the oil and their equipment cool as they haul out mounds of smoking sludge and earth.

Curbing the flames in spite of ISIS

Only when they find the head of the well can they determine the extent of the damage and what must be done to close it. Often experts must be lowered into the well to inspect and repair breaks while the fire still burns above ground.

Wells that have only been set alight can be turned off via a functioning valve. But if the well was blown up with explosives -- which is the case for most -- then fixing the break is far more challenging.

A desperate effort to cap the wells is underway but engineers warn it is not a quick and easy fix.

Plugging the leak with cement is the option of last resort because it means the well cant be used in the future.

And as oil field guards fight to stifle the flames, ISIS have continued to deliberately disrupt their work. Militants were still fighting Iraqi troops nearby when the repairs began and workers say they sometimes came under mortar fire. The group also left mines around the wells which have yet to be cleared.

"Right now we have the problem of the IEDs that were planted by ISIS," Mohammed explains. "We have been working with a de-mining unit of the federal police to clear the area."

It is too early to accurately determine the value of the wasted oil or cost of the repair work.

So far 120 IEDs, or improvised explosive devices, have been located around the burning wells. Officials say they expect to find dozens more. Despite the dangers, the small teams of men working to put out the poisonous fires remain resolute.

"We have to overcome all these difficulties and turn off the wells," Abdelqadr Soltan, one of the workers, says. "This is our job and this our duty."