The boy suffered extensive bruising

The girls, two aged 17 and one 16, were convicted of false imprisonment and causing a person to engage in sexual activity without consent.

Inner London Crown Court heard the victim, now 18, was stripped, punched and kicked while the attack was filmed.

It took place in a flat in Woolwich, south-east London, in March 2006.

Begging for mercy

Judge Colin Smith told them that a particularly unpleasant and increasingly common feature of the victim's ordeal was that it was video-recorded on at least one mobile phone.

During the boy's ordeal he was subjected to a "sudden severe physical assault", made to strip naked and forced to perform a sex act in front of the group.

The court heard that in a recording the boy could be seen being forced to sit in a cold bath while ketchup and kitchen oil was poured over him as he begged for mercy.

This kind of behaviour went far beyond even serious bullying

Judge Colin Smith

"One can tell, listening to that video, that the ordeal was being played out to a background of extremely loud screaming and laughing by the group," the judge said.

After several hours the boy managed to escape, with some of his clothes, and went to his ex-girlfriend's mother's house.

He had red marks on his face, was bleeding from one ear and a doctor's examination revealed extensive bruising all over his body.

Pain and humiliation

The judge told the girls he was satisfied there had been "some kind of non-payment of some kind of debt and as a result of that... you decided to teach the victim a lesson".

"This kind of behaviour went far beyond even serious bullying, and amounted to the infliction of pain and humiliation on the victim, which is intolerable behaviour."

One of the 17-year-olds, said to be the ringleader, received a four-year detention order.

The 16-year-old was given three years' detention and the other 17-year-old was given a two-year detention and training order.

The trio, who cannot be named because of their age, were found guilty of false imprisonment and causing a person to engage in sexual activity without consent on 9 August.

One of the girls pleaded guilty to assault causing actual bodily harm and the other two were found guilty of the same charge.