Boys that ran away from the jihadist terrorist group al-Shabaab and those apprehended say that Somali intelligence agents had for years forced them to work as informants.

The al-Qaeda-backed group has been notorious for kidnapping kids from schools and sending them to training camps so as to use them later as combatants in the frontlines of Somali civil war. It turns out that even those who managed escape from the militants didn't find safety in their new way of live.

For years the children were kept at a government-run detention center in Mogadishu and reportedly used in intelligence operations. Only in late 2015, after years of efforts by UN and human-rights officials, Somali authorities transferred the boys to a new rehabilitation facility where they are not accessible to intelligence agents.

In an interview to the The Washington Post, the boys said that the country's National Intelligence and Security Agency (NISA) had been using them as "finger-pointers". They would be sent to dangerous neighborhoods where al-Shabaab insurgents were hiding and told to point out their former comrades. On many occasions their faces were not covered, although the agents concealed their own.

"They took me sometimes in a car and sometimes on foot and said, ‘Tell us who is al-Shabab'," on boy said. "It's scary because you know everyone can see you working with them."

The children were used on other missions to collect intelligence and sometimes told to wear NISA uniforms. According to the boys, they were threatened if they refused to cooperate, and their parents didn't know where they were.

"Maybe they thought because we were young we would be easier to manipulate," said one 15-year-old boy who goes under nickname Yariso ("Shorty").

Several boys were killed. One tried to hang himself while in custody.

According to several current and former US officials, the US government for years has supported The Somali agency in terms of funding and training, although its use of child informants goes in violation with the international law.

In 2008, the U.S. Congress passed the Child Soldiers Prevention Act (CSPA), aimed at blocking military assistance to countries that "recruit and use child soldiers." Every year after it took effect, the State Department has found that the Somali military has been recruiting children.

In 2015, UNICEF recorded over 300 cases of kids being used as soldiers by Somali forces. But this year the US allocated $330 million to Somalia under a "national interest" waiver, and a substantial portion has gone to the security sector.

Somalia's intelligence chief denied that the boys were forced to work as spies, claiming that some of those kept in custody sometimes volunteered to go on missions and yield "important information" that has helped agents prevent future attacks.

Although details of the CIA's operations in Somalia are not being disclosed, Somali officials said the two agencies work together closely.

"There's nothing NISA does that the CIA doesn't know about," a senior Somali official said on the condition of anonymity.

One Somali security official confirmed that NISA still keeps "hundreds" of children in its facilities and uses them as intelligence assets.