A FEW days ago I got home from the frontlines around the Iraqi city of Mosul. It’s always a bit of a relief to get back, but even so, it’s funny how the mind still plays tricks after such a trip.

Walking along a Glasgow street yesterday, I found myself automatically sidestepping a strand of thin cable sticking out from the side of a wall. The cable itself was completely harmless, but so accustomed have I become these past weeks to avoiding anything resembling a booby trap bomb that I instinctively reacted when I saw it.

Many things about the battle for Mosul are terrifying, but nothing more so than the swathes of landmines, improvised explosive devices (IEDs), booby traps and unexploded ordnance that litter the city’s neighbourhoods along with the towns and villages that surround them.

Over the years on battlefields of war zones across the world, I’ve seen the grisly damage landmines and similar devices can do and how easy it is to fall victim to them. I recall once back in the 1980s being with some Afghan guerrilla fighters who had taken a strategic hill top position from defending Soviet Red Army soldiers. Days of heavy fighting had left only a batch of pulverised emplacements, the charred bodies of its young Russian defenders sticking out from the rubble surrounded by spent shell cases and empty ration tins of Bulgarian meat. One of them lay face up, twisted under some wooden beams. Perhaps it was the sight of the corpse or the stench, but I started to turn away until a sudden shout stopped me in my tracks.

At my feet a young Afghan fighter carefully traced a wire revealing a booby-trap grenade pegged into the ground at either end. I remember looking back at the body of the young Russian. Only by luck had I not ended up like him.

In Mosul as the self-proclaimed caliphate of the Islamic State (IS) group begins to crumble those remaining jihadist fighters left to make their own final stand have ensured that every inch of their former territory continues to be a killing field.

It’s anyone’s guess as to how many deadly devices IS has left behind, but experts reckon the jihadists have planted them on a scale seldom seen in modern warfare.

Walking through streets or clambering through buildings I quickly learned that in Mosul nothing is necessarily as innocent as it might appear. Discarded tin cans, a child’s toy, a football or random piece of timber could be rigged to explode. The worst thing of course about such devices is that they are totally indiscriminate in terms of who they target.

In some cases though, IS has quite clearly sought to ensure that ordinary civilians bear the brunt of these explosions. For those families trying to return home to what remains of their houses, pushing open a door, turning on a light, opening fridges, cupboards, chicken coops could all result in maiming or death. IS has taken every opportunity to kill using such traps. Around its largest known mass grave, a natural sinkhole known locally as the “khasfah” where perhaps as many as 4,000 bodies have been dumped, it has littered the ground with landmines aiming to kill investigators documenting atrocities carried out by the jihadists.

These are weapons that don’t recognise ceasefires and lie in wait for their victims long after the end of conflicts. They instill fear, creating a lethal barrier to development and often preventing people from returning to their homes or picking up their livelihoods.

It was as far back as 1997 that the Mine Ban Treaty – sometimes known as the Ottawa Treaty – was drawn up. This international agreement bans the use, production, stockpiling and transfer of antipersonnel mines and places obligations on countries to clear affected areas, assist victims and destroy stockpiles. While the treaty is arguably the best framework for solving the problems still posed by mines all over the world, its practical application as revealed in situations like Mosul remains limited.

Conventional landmines, as well as the companies and nations who produce them, are only one side of the story. What the battle for Mosul has revealed is that for the likes of terrorist groups like IS, such treaties and conventions are meaningless. In other words those very qualities that make landmines unacceptable to many nations make them ideal to the likes of IS. Not only have they deployed landmines and explosive devices on a mass scale but have used lethal improvisation of a kind ordnance clearance charities and bodies have rarely if ever encountered.

While conventional landmines themselves are comparatively easy to clear, the booby traps are more complicated. Islamic State fighters who deployed them often change their methods or use anti-tamper devices to make it difficult for disposal experts.

According to one such body the Mines Advisory Group (Mag), a British charity specialising in mine clearance, they have removed more than 8,000 devices in Iraq since last summer, including 1,000 landmines and booby traps in one village alone, Tullaban. This, frankly, is nothing compared to the challenge these organisations will face during the course of Mosul’s liberation from IS rule by the Iraqi Army and in the aftermath of that campaign.

Mag, along with the Scotland based Halo Trust are responsible for more than a half of the world’s humanitarian demining. The men and women who make up their ranks are responsible for the daunting task of trying to clear up the scourge of landmines across the globe from Iraq to Afghanistan, Somalia to Cambodia and beyond.

This week just a few days after I returned from Iraq, I was invited to the opening of an exhibition at the National War Museum at Edinburgh Castle that contains film, photographs and items of equipment used by the Halo Trust teams in the field. In one display case sits a few examples of now deactivated landmines. Most are small and nondescript but when deployed and active take a terrible toll on civilians, especially children.

Fortunately few of us will ever encounter these devices beyond the exhibition cases like those at the National War Museum. For countless other people, however, in and around Mosul and caught up in other conflicts across the world, these cynical cruel and indiscriminate weapons remain a plague on their lives.