BANDA ACEH, Indonesia (AP) — A law that makes gay sex punishable by public caning took effect Friday in a conservative Indonesian province.

The law in Aceh province stipulates that anyone caught having homosexual sex can face up to 100 strokes of a cane, a fine of up to 1 kilogram (2.2 pounds) of gold (about $37,400) and imprisonment of up to 100 months. Adulterers are also subject to 100 lashes of a cane, but not to the fine or imprisonment.

Aceh is considered more devout than other areas of Muslim-majority Indonesia and is the only province allowed to observe a version of Islamic Shariah law.

“There is nothing to be worried about with the enactment of the law,” said Syahrizal Abbas, chief of the Islamic Shariah. “This becomes the umbrella for the upholding of Islamic law.”

Indonesia’s national criminal code doesn’t regulate homosexuality, and the central government doesn’t have the power to strike down provincial laws. However, an earlier version of the law that called for people to be stoned to death for adultery was dropped because of pressure from the central government.

Human rights groups have criticized the law, saying it violates international treaties signed by Indonesia protecting the rights of minorities.

“It does not violate human rights. It instead raises the dignity of human beings,” Abbas said.

The law applies to all Muslims. Non-Muslims, who account for about 1 percent of the province’s population, can choose whether they wish to follow the provincial law or the national criminal code, Abbas said.

Indonesia’s secular central government granted Aceh the right to implement Islamic Shariah law in 2006 as part of a peace deal to end a separatist war. A religious police and court system have been established and the new law is a significant strengthening of Shariah in the region.

People convicted of gambling and consuming alcohol already face caning, as do women who wear tight clothes and people who skip Friday Muslim prayers.

© 2015, Associated Press, All Rights Reserved.

This material may not be published, broadcast, rewritten, or redistributed.