Two schoolboys have won a legal battle to have their names taken off the sex offenders register after the High Court ruled their human rights had been breached.

One 15-year-old youth from County Durham had admitted "pinging bra straps and touching girls on the bottom playfully" at school, and a second 15-year-old confessed to putting his hand up a girl's skirt and pinching her while standing on a platform at New Cross Gate station, in south east London.

Both R, the boy from Durham, and U, from the London area, ended up on the sex offenders register as a result of the system of reprimands and warnings introduced under the 1998 Crime and Disorder Act.

Reprimands and warnings are administered when a young person with a clean record admits an offence and a police officer considers that, although he has evidence which would probably result in a conviction, it would not be in the public interest to prosecute.

In both cases the police decided the boys should be given final warnings and as a result were required to register under the 1997 Sex Offenders Act - a consequence of which neither was aware when the warnings were issued.

Yesterday's court challenge centred on whether the failure to alert them before they consented to the warnings was incompatible with human rights law.

Lord Justice Latham, sitting with Mr Justice Field, ruled that it was incompatible with Article Six of the European Convention on Human Rights, which guarantees the right to a fair hearing.

The judges said: "In the two cases with which we are concerned, there has clearly been no informed consent, so that there has been a breach of the claimants' Article Six rights."

The two judges heard that a number of girls made complaints against R in November last year over what they considered to be indecent assaults, and as a result he was excluded from school.

R had admitted to "horseplay", such as pinging bra straps and touching the girls' bottoms playfully, which he did not consider to have any sexual connotation.

He also confessed to touching two girls on the breast area outside their jumpers.

The court heard he had lost all his friends and become suicidal after being placed on the register.

His father told the judges that, although the boy initially regarded his misbehaviour as "horseplay", he rightly changed his attitude when interviewed by the police.

But in addition to the serious "slap on the wrist" he had expected in the form of a final warning from police, his son was required to record his name on the register for two-and-a-half years, wrecking his plans for a military career.

The father claimed that before his son confessed to the assaults, no warning was given that he could end up on the register.

He said: "We tried to help the police in putting him right and we thought the warning was a good idea."

But the "relentless" pressure felt by the boy after he was placed on the register ruined his life.