Security forces in the Kurdish regions of Iraq have been "torturing children" to force them to confess to having links with the Islamic State of Iraq and Levant (ISIL, also known as ISIS) group, according to Human Rights Watch.

The rights body said on Tuesday it interviewed over 20 boys aged between 14 and 17 who were charged with, or convicted of, belonging to ISIL, which controlled vast swaths of Iraq until late 2017.

Sixteen of the boys said they had been "tortured" during questioning.

Nearly two years after the Kurdistan Regional Government promised to investigate the torture of child detainees, it is still occurring with alarming frequency Jo Becker, HRW

"Nearly two years after the Kurdistan Regional Government promised to investigate the torture of child detainees, it is still occurring with alarming frequency," said Jo Becker, children's rights advocacy director at HRW, said in a statement.

Some of the boys interviewed by HRW said members of the Kurdish security forces known as Asayesh beat them with plastic pipes, electric cables or rods while others said they were subjected to electric shocks or a painful stress position dubbed the "scorpion".

"Several boys said the torture continued over consecutive days and only ended when they confessed" to involvement with ISIL, the report said.

"Most said they had no access to a lawyer and they were not allowed to read the confessions Asayesh wrote and forced them to sign," it added.

The alleged torture inflicted by the security forces of the Kurdistan Regional Government in northern Iraq took place in 2017 and 2018 despite promises by authorities to investigate the claims.

According to HRW, most of the boys said their interrogators told them what they should confess and many said they gave false testimony only to stop the torture.

"Hussein" was arrested in Iraq when he was 14. "They beat me all over my body with a plastic water pipe, and then tied my hands like a scorpion for two hours." He was told that the only way to stop the torture was to confess he belonged to #ISIS. https://t.co/GERs9u2THH pic.twitter.com/Kac40mpYgD — Jo Becker (@jobeckerhrw) January 8, 2019

According to the report, Samir, whose real name was withheld to "protect his security", claimed that for three days, security forces "gave me 5 to 10 electric shocks. They put the pads on my left shoulder and on my stomach. And while they gave me the shocks, they were beating me with a rod.

"I was in the room for hours, with them coming in and out and taking breaks. On the third day, I confessed. They said to admit to two months with ISIS. I did, but it was a lie. I was never with ISIS."

Kurdish denial

The rights group said its staff interviewed the boys during a November visit to a detention centre in Erbil where 63 children are being held. HRW's report claimed that legal assistance to the boys was lacking and that trials lasted "no more than 5 or 10 minutes".

A senior Kurdish official dismissed the allegations.

Dindar Zebari, international affairs adviser to the Kurdish government, told the AFP news agency that "HRW never visited" the detention centre.

"No one can be arrested unless the judiciary authorises it. And any person who has been arrested is treated in accordance with the law," he said, adding that the Kurdish government rejects the use of torture.

HRW called on the government to investigate these claims: "The Kurdistan authorities should immediately end all torture of child detainees and investigate those responsible," children's rights advocate Becker said.