Shuhada school sits on what was one of Iraq’s most violent frontlines, in the former Isis stronghold of Fallujah.

The children have to walk along a dirt road, the edges of which are lined with red-painted bricks and skull and crossbones signs that warn of the risk beyond the makeshift border – landmines laid by the extremist group.

Hundreds of the homemade devices are buried in fields, inside war-damaged houses and under roads, forming a densely-packed belt that stretches for 15km and more.

Daily life for the people of Fallujah’s southern neighbourhood of Shuhada is shaped by the surrounding minefields. They dictate where they can live, walk, farm and allow children to play.

One of the first Iraqi cities clawed back from the self-proclaimed Islamic State caliphate, Fallujah is left with the conflict’s lingering and deadly legacy.

As the morning classes end, minibuses and parents on foot arrive to pick up the children. Others leave together in small groups to walk home along routes made safe and marked by the Halo Trust, the British demining charity.

Reopening the school was a priority as families began slowly to return to the city. “It was impossible before, so the children were taught in caravans,” says Sami Hamad Abbas, the school’s deputy head.

The danger posed by the uncleared areas is hammered home to the pupils on a weekly basis.

Halo Trust deminers on a training exercise in Fallujah. Photograph: Sean Smith/The Guardian

“Every Thursday we have morning assembly inside the school,” adds Abbas. “We tell them about the danger of mines and tell them which safe routes to take.”

Even so, the nature of the risk is not always constant, says.

“In the last few days it’s been raining [softening the ground], so we told the children to stay at home because it was more dangerous.”

And Fallujah is symbolic of a far wider problem.

Devices Isis produced on a semi-industrial basis to lay in large barrier minefields are scattered throughout northern and western Iraq, from Mosul – the site of the group’s last stand – to al-Qaim on the Syrian border, where the group is still fighting, contributing to the displacement of an estimated 1.7 million Iraqis.

The issue is not unique to Iraq. Similar homemade mines have been encountered from Afghanistan to Syria and Yemen – an escalating threat that has recently pushed global efforts to reduce landmine casualties into a sharp reverse.

If Shuhada is fortunate in any way, it is because, as one of the first of the Iraqi neighbourhoods liberated from Isis, the devices – unlike the mines of the cold war era – are slowly degenerating.

The neighbourhood is also the focus of innovative efforts to clear its mine contamination. Among the organisations involved is the Britain-based Halo Trust, which began working there this summer. The organisation is training local Iraqis in quicker and cheaper clearance techniques, using armoured mechanical diggers that sift the devices out of the soil.

A short drive from the school, in al-Nuaimiya, the house of the family of Abdel Latif, aged 26, sits overlooking a dry ditch once used to water fields of wheat and barley. Children are playing in front of the house.

He explains that, because of the danger, they cannot leave the boundary of their little home.

The reason is immediately clear. In the field next to his half-destroyed farm, the wind and rain have exposed dozens of landmines less than 20 metres from where the children play.

“Four men were killed last year scavenging for metal in the ditch after triggering a mine,” he says. Residents are frustrated with the slow pace of clearance, prompting at least one local man to try to deactivate the mines himself.

“The Iraqi army’s bomb disposal people came,” he explains angrily, “but they left and, since then, they have not returned.”

Red bricks mark areas yet to be swept for explosive devices. Photograph: Sean Smith/The Guardian

Listening to Abdel is James Cowan, chief executive of the Halo Trust, a former British army officer who commanded British troops in the fighting around Fallujah in 2004.

Cowan is in Iraq as part of his group’s efforts to drum up international support for mine clearance efforts, an issue he fears is suffering from donor fatigue despite the challenges posed by the new proliferation.

Already working in Fallujah, Halo is now also opening two new mine-clearing centres in Tikrit and hopes to be able to work in Iraq’s far west when the situation becomes secure enough.

“In people’s minds, they think of landmines as being small round things produced by factories and made by nations,” he told the Guardian.

“What is going on now is that landmines are improvised. They’re not made by nation states. They are made by terrorist organisations. And as a result of conflicts in Afghanistan, Iraq, Syria Libya and elsewhere, we’re seeing a very startling rise in the number of casualties.”

Unlike the anti-personnel mines of old, which contain a few hundred grams of high explosive, the new devices contain several kilos. Injuries are consequently far more deadly, including the risk of multiple amputations for those who survive.

Cowan is concerned not only about the physical threat, but also the social impact – especially if they are not quickly cleared.

“It’s not just the casualties themselves that trouble me, but the displacement effect. People are too scared to return home. And as a result of not being able to get back into their homes, they become vulnerable in their own right.

“[But] we are in danger of running out of money and we need donors to finish the job here in Fallujah.”

If residents cannot farm and rebuild their homes and livelihoods, he says, they are vulnerable to radicalisation and a new cycle of violence in a city – and a still deeply politically unstable country – where conflict has erupted repeatedly since the US-led 2003 invasion that toppled Saddam Hussein.

Mustafa was the first to return to Shuhada after the conflict and rebuild.

“My house was in the middle of the war zone between Isis and the Iraqi army,” he says. “There’s just one path we can use to leave the house to get to other areas.

“Isis planted mines not just under the streets, but under the gardens. They even planted devices under the mattresses, under the floor tiles and under the fridges. And I was a wanted guy by Isis because I was a moderate.”

He explains why he came back while other neighbours still stay away.

“We have to take the risk. We don’t have the money to move to different safe areas, so we have to stay in our houses.”

The continuing risk, in a still unstable country, is one that is also shared by the local mine clearers.

Evidence of that danger was brutally underlined on Monday, when a shooting attack in a village to the north of Fallujah claimed the life of Meshan Khalil, a Halo survey team leader, who had accompanied the Guardian’s reporters, as well as the driver of one of Halo’s demining vehicles in Shuhada, while they were off duty attending a village gathering.