A South African court has sentenced four men to 18 years for a murder rights activists say was carried out because the victim was a lesbian.

The men were sentenced Tuesday for the 2006 stabbing and stoning attack on Zoliswa Nkonyana. Activists say such violence is increasing, highlighting the gap between society's sometimes narrow view of sexual identity and the role of women on one side, and South Africa's liberal constitution, which has some of the strongest provisions on gay rights on the continent.

In a statement, the Commission for Gender Equality says the Cape Town court's ruling is a lesson to perpetrators of homophobic violence. The commission said it would work to stop "this continued violation of gays' and lesbians' rights."