A sheriff has criticised the legal restrictions which stopped him putting two Edinburgh teenagers in custody for an unprovoked attack on a stranger.
The pair were sentenced at Edinburgh Sheriff Court
Sheriff Gordon Liddle's comments come as the Scottish Government announced plans to reduce jail offender numbers.
Stephen McGlinchey, 16, and Sean King, 17, had earlier pleaded guilty to assaulting Timothy Flowers in the city's Greenside Place on 2 January.
The pair were sentenced to 72 days each in jail at Edinburgh Sheriff Court.
Fiscal Depute Neil Allan said Mr Flowers, who is in his late 20s, "had the misfortune to come across a group of individuals, which included the two accused".
There was offensive shouting at him and a plastic bottle was thrown. It struck a passing taxi and when the driver got out of the cab he saw the gang of youths surrounding Mr Flowers.
The fiscal said McGlinchey started the violence and King joined in.
Their victim was repeatedly kicked and punched on the face, head and body.
The attack was caught on CCTV and police officers who saw it described it as "despicable, wholly unprovoked and merciless".
Mr Flowers was totally overwhelmed by the gang and one officer described it as the worst assault he had seen.
Solicitors appearing for the two youths said their clients were remorseful and deeply regretted their actions.
The incident had been "fuelled by alcohol". Both were assessed by social workers as being at low risk of re-offending.
Sheriff Liddle told McGlinchey of Burns Street and King, of Primrose Street, both Edinburgh: "You two are young thugs, nothing more, nothing less.
"I tell you this, right here and now, you are lucky this charge was not brought on indictment, because if it had been that would have allowed me to pass the custodial sentence this case deserves.
"I can't because you are first offenders and it is on summary complaint.
"The maximum I can sentence you to is three months, which is woefully inadequate.
"Worse than that, I can't even do that, because you are entitled to a discount for the early plea."