Two months ago, 10 Indonesian boys who earn a few dollars a day shining shoes at Jakarta's international airport decided to take a short break.
The boys, aged 12 to 16, gathered in a car park. To kill some time, they played macan buram, a game that involves spinning a coin and guessing heads or tails.
To make things more interesting, they decided to play for a prize: 1,000 rupiah. About 15 NZ cents.
By playing for cash, the boys unwittingly fell foul of Indonesian criminal law, under which "gambling for profit" carries a maximum penalty of 10 years' jail.
And so began for the boys an ordeal that last week culminated in criminal convictions and has thrown the spotlight (again) on how capricious and heavy-handed Indonesia's justice system can be.
Police spotted the boys, arrested them and took them to the airport's police office, where they held them for several days.
Police then transferred the boys to a juvenile detention centre, where they were held for almost a month.
Meanwhile, prosecutors decided to pursue charges and brought their case to trial last month.
These were the same prosecutors who, amid much public outrage, pursued a criminal defamation case against a woman who complained to her friends via email about the treatment she received at a local hospital.
Tangerang District Court dismissed that case but last week found the shoeshine boys guilty as charged.
The court did not sentence the boys to prison but the verdict still sparked outrage from child welfare activists.
"The justice system is played with like a toy and ironically it takes its toll on children," Arist Merdeka Sirait, secretary general of the National Commission for Child Protection, told local media.
"The guilty status could well become a painful psychological burden on the children for the rest of their lives."
But the court reasoned the boys had to be convicted or they could potentially repeat their crime.
Family counts blessings after superbug scare (graphic content)