(CNN) The UK government is facing a court challenge over its use of children as spies in criminal investigations, as lawyers for a children's charity accused it of causing minors "severe physical and emotional harm."

Just for Kids Law said the use of minors as "covert human intelligence sources" (CHIS) without adequate safeguards violates national and international human-rights laws, including the United Nations Convention on the Rights of the Child. A hearing was held Tuesday in the charity's case against the Home Office.

Caoilfhionn Gallagher, representing the charity, cited a case raised in the British Parliament in October in which police asked a 17-year-old girl to spy on a man, subjecting her to sexual exploitation.

"While deployed, she continued to be exploited by him and the papers suggest she was even coerced into being an accessory to murder," Gallagher said, according to the British Press Association (PA).

UK legislation permits the use of children as spies by police and other authorities, but an assessment of the risks involved must be carried out. Authorities must determine that "risks identified in it are justified" and "have been properly explained to and understood by the source."

Read More