ERBIL/BAGHDAD (Reuters) - Islamic State militants have placed booby traps across the city of Mosul, dug tunnels and recruited children as spies in anticipation of an offensive to dislodge the jihadists from their Iraqi stronghold, Iraqis and U.S. officials said.

A fighter of the Islamic State of Iraq and the Levant (ISIL) holds an ISIL flag and a weapon on a street in the city of Mosul, Iraq June 23, 2014. To match Insight MIDEAST-CRISIS/MOSUL-ISLAMIC STATE REUTERS/Stringer/File Photo

Mosul, home to up to 1.5 million people, has been the headquarters of Islamic State’s self-declared caliphate in northern Iraq since 2014 and the militants are making complex preparations to prevent Iraqi security forces, backed by a U.S.-led coalition, taking it back.

The battle for the city, expected later this month, will help shape the future of Iraq and the legacy of U.S. President Barack Obama. Even if Islamic State is driven out, there is a real danger of sectarian strife, especially if civilian casualties are high in a mainly Sunni city wary of the Shi-ite led Iraqi government and the Shi’ite militias it depends on.

The jihadists, who swept into Mosul almost unopposed two years ago as Iraqi forces fled, have rigged its five bridges with explosives, prepared car bombs and suicide attackers and stepped up surveillance, according to four residents who spoke via telephone or social media.

“They are digging in to fight for Mosul. They are more cautious, shaving their beards to blend in with the population and constantly moving their headquarters around,” said former finance and foreign minister Hoshiyar Zebari,

Zebari, a senior member of the Kurdistan Democratic Party with access to intelligence on Islamic State movements in Mosul, and Col. John Dorrian, a spokesman for the U.S.-led coalition, both said the group was moving men and equipment through underground tunnels.

“You see a fighter go in one place and pop up in another,” said Dorrian. “The entrances are always exposed and those are a priority target.”

Islamic State fighters have put up concrete embankments and are using concrete T-walls to block points of entry for the attacking force, he said. Mosul residents said the militants have also dug a two meter by two meter trench around the perimeter of the city to be filled with burning oil to make air strikes more difficult.

Aid groups have expressed concern over the prospect that many civilians could be killed in the fighting. About 200,000 people are expected to flee within the first two weeks of fighting, said Lise Grande, the U.N. humanitarian coordinator for Iraq.

“FUTURE TERRORISTS”

Reuters was unable to directly verify the reports of Islamic State’s battle preparations. This story is based on interviews with U.S. and Iraqi officials such as Zebari and Dorrian and phone interviews with civilians in Mosul.

The planned coalition attack is part of a concerted assault that has reclaimed territory from IS in Syria, Iraq and Libya.

The militants have recently lost control of the Iraqi cities of Falluja and Ramadi and are threatening to execute anyone discussing “liberation” in Mosul, according to residents and Sunni militia forces who spoke to relatives there.

One resident said children as young as eight, sometimes armed with pistols and knives, have been deployed across the city to monitor and inform on the population. The children recruit other children for the same task.

“It’s a really heartbreaking scene to see Mosul’s kids becoming future terrorists. I taught my seven-year-old son all about autism to pretend he’s mentally ill to avoid being recruited by Daesh,” the resident said by WhatsApp, using an Arab acronym for Islamic State.

“They are desperate and they could force even children to fight once government troops are at the doors of Mosul.”

Other residents say they have begun using older mobile phones which cannot carry applications like Viber, WhatsApp or Facebook messenger, because Islamic State fighters are highly sensitive to the use of smart phones which make it easier to pass information about their operations to security forces.

Jihadists sit on the rooftops of tall buildings on the edge of Mosul with night-vision binoculars to watch for anyone trying to escape and fighters are making holes in the streets with jackhammers to place improvised explosive devices.

“It would make it like hell if they placed bombs in each hole,” one of the residents said.

SECTARIAN FEARS

The campaign could either increase the chances of a unified Iraq or break it up if sectarian clashes follow as various groups compete for influence in the country’s second largest city, Iraqi officials say.

Iraq descended into civil war, mainly between Shi’ites and Sunnis, after a U.S.-led invasion toppled Saddam Hussein in 2003, and some Sunni Arab tribal leaders and former members of Saddam’s Baath Party support Islamic State.

Before a single shot has been fired, Iraqi security forces have been working in Mosul to sway community leaders away from the group, a Western diplomat said.

Zebari said there were signs of a nascent resistance movement in the city, where some residents have spray painted “wanted” signs on the houses of Islamic State fighters and commanders, risking death.

The jihadists have started bringing women along for surprise house searches so they can check that female residents, who are not allowed to mix with men outside the family, are not hiding anything from the group.

“They are desperate, they look afraid , this is the first time they use their women in searching houses,” a Mosul resident, who asked not to be named for safety reasons, told Reuters over social media.

“Two days ago, I rushed to my house door after hearing repeated knocks and when I opened the door I saw three women in Islamic hijab showing only their eyes with three Daesh fighters behind them,” the resident said.

All the residents said the group was using cranes to lower fighters beneath bridges in the city to place explosives there.

“They carry out the booby trapping of the bridges during the night to avoid air strikes,” said one.

Some Islamic State leaders and fighters have been leaving for the town of Tal Afar, also under Islamic State control, or further on across the Syrian border, U.S. officials said.

The security forces have been buoyed by victories against the group in Falluja and Ramadi, but face an additional challenge as Iraqi officials squabble over the composition of the fighting force for Mosul, Iraqi officials said.

The primary goal is to keep Iranian-backed Shi’ite militias out of Mosul to avoid sectarian clashes in a Sunni-majority city.

Shi’ite militias will be allowed to take the lead in operations to retake Hawija, a nearby town controlled by Islamic State, officials said.

They hope that driving Islamic State from Mosul will debilitate the group, although it could still threaten Iraq.

“They could go underground and carry out terrorist acts,” Zebari said. “But not as an organized movement.”