Lawmakers in the Muslim Indonesian province of Aceh on Saturday approved a law that punishes gay sex by public caning.

The 69-member assembly unanimously approved the measure after hours of lengthy debate, the AP reported.

“It's discriminatory and saddening,” said King Oey, a gay rights activist. “We urge people who are concerned with human rights will not sit by silently.”

The law makes anal sex between men and the “rubbing of body parts between women for stimulation” punishable by up to 100 public lashes with a thin rattan stick. The caning is meant to humiliate, rather than cause physical pain.

Ninety-nine percent of Aceh residents are Muslims but the law also applies to non-Muslims and foreigners.

Amnesty International called for the law's repeal.

“The criminalization of individuals based on their sexual orientation is a huge blow for equality in Indonesia,” said Richard Bennett, the group's Asia-Pacific director.

The move is part of the province's implementation of Islamic Sharia Law started in 2006 and allowed by the central government as part of a peace deal to quell a growing separatist movement.