A court in the Maldives has ordered a public flogging for a 16-year-old girl who confessed to having pre-marital sex, in a ruling that Tuesday triggered widespread criticism from rights groups.