The punishment, condemned by rights groups, marked the first application of anti-homosexuality laws introduced in the province in 2014.