MOSUL, Iraq (Reuters) - To others, he was simply a rubbish collector employed by Islamic State to clean the streets of Mosul, but secretly he was informing on the militants.

Smoke rises after an explosion of an IED planted by Islamic States fighters in south of Mosul, Iraq February 20, 2017. REUTERS/Alaa Al-Marjani

For more than two years, the 24-year-old risked his life to pass information about the militants’ positions to Iraqi forces who finally drove them out of the city’s eastern half in January.

“Nobody knew me,” said the man, who is now helping Iraqi security security services track down sleeper cells. “I know them (the militants) all personally.”

Many of the militants were killed, detained or fled during three months of urban combat, but some shaved off their beards and melted back into the civilian population, hoping to slip through the net.

As Iraqi forces attack Islamic State fighters in the west of the city, security agencies in the east are waging a different kind of campaign that will determine whether Mosul’s future is more stable or has the conditions for a new insurgency.

Success will depend largely on cooperation between the security services and residents, who are best placed to identify the militants hidden in their midst.

Before Islamic State overran Mosul in the summer of 2014, many residents there chafed against the security services, which they regarded as corrupt and heavy-handed.

“We don’t want to repeat the mistakes of the past,” said the general in charge of the vetting process, who asked to remain unnamed. “There were mistakes on both sides. People didn’t cooperate with the security apparatus.”

The National Security Service (NSS) is now going from district to district, searching homes and checking residents on a database containing the names of thousands of people wanted across Iraq.

Since beginning the process in February, more than half the eastern side of the city has been checked and more than 240 suspects caught, an NSS officer said.

Residents however complain that the process is haphazard and on Sunday two suicide bombers blew themselves up in eastern Mosul as Iraqi forces launched an offensive on the west, which is still controlled by Islamic State.

SLEEPER CELLS?

Last week, the army sealed off another district - Karama - and directed all men of military age to an elementary school, where they were processed after being patted down one by one to ensure there were no weapons or explosives concealed beneath their clothing.

But it was the informant who led intelligence officers to most of the suspects - three by midday - including a member of his extended family.

He said fellow residents were reluctant to give up the militants in hiding. “Some of them are scared,” he said.

The suspects he identified were bundled into the school, where timetables pinned to the notice boards are dated 2014 - as though time had stopped when Islamic State overran the city.

The militants’ presence can still be seen in the colourful murals decorating the walls: in keeping with a ban on depicting living creatures, the face of a butterfly and a painting of SpongeBob SquarePants have been sprayed over in black.

An intelligence officer led one of the suspects down a corridor into a classroom and sat him down on a desk after emptying his pockets, which contained a Koran.

The young man denied swearing allegiance to Islamic State and said he had been arrested by the militants on suspicion of being an informant for Iraqi security forces himself.

“I will tell you whatever you want,” he said, listing names of people he said had joined the group. “If I had done something wrong, would I show my face around here?”

The intelligence officer was unconvinced, however, citing witness accounts of him wearing Islamic State uniform.

“We have sources and they have sources,” said the officer. “They (the three suspects) are sleeper cells”.

The man eventually divulged that his brother was an Islamic State member, but maintained his own innocence, urging the officer to kill him then and there if he could prove his guilt.