Police called to the house in Belfast after receiving a report that the boy was out of control and found his father restraining him on the floor.

He was handcuffed, arrested and told to calm down. At that stage D was taken into custody on suspicion of committing assault occasioning actual bodily harm, possession of an offensive weapon with intent, resisting police and threats to kill.

Although his father later confirmed he would be making no complaint, the boy was interviewed in the presence of an appropriate adult and solicitor.

He was later released unconditionally on all charges except for resisting police.

The PSNI submitted a report to the Public Prosecution Service (PPS) recommending no prosecution on the remaining offence.

It was not deemed to be in the public interest to pursue a charge based on D's age, troubled family background and lack of previous offending.

However, the PPS took a contrary view and considered a number of diversionary options, including an IW, caution or a youth conference.

The prosecuting authority decided the informed warning was appropriate because it was considered less serious and had a shorter lifespan.

In December 2013 the IW was administered by a PSNI youth diversion officer in the presence of the boy's father and social worker.

It was explained that, if accepted, the warning would appear on his record. During the process the officer confirmed D was admitting the resisting arrest offence and consented to the form of disposal.

Judicial proceedings were subsequently lodged over the decision to administer the IW without providing the boy with legal representation for the process.

The challenge was focused solely on the question of consent where it was based on an admission of offending without the benefit of legal advice.

D's lawyers claimed the move breached his human rights. Delivering judgment alongside Lord Justice Weir and Mr Justice Treacy, Lord Justice Coghlin described diversionary schemes as "praiseworthy attempts" by the PPS and PSNI to achieve a just balance between the rights of the individual and community.

But he held: "In the particular circumstances of this case, the applicant's consent could not be regarded as sufficiently or properly informed and that, consequently, the decision of the PSNI to administer the IW without referring to the possibility of seeking legal advice beforehand was not in accordance with law and should be quashed."