Updated

Indonesia's deeply conservative Muslim province of Aceh on Friday publicly caned 15 people found guilty of violating Shariah law, despite pledging not to carry out the punishment in public.

Several hundred people including a group of tourists from Malaysia watched the caning after Friday prayers outside the Baiturrahim Mosque in the provincial capital, Banda Aceh.

Among those punished were a gay couple sentenced to receive 86 lashes each by three executioners. The two men had been captured by residents in Banda Aceh and were sentenced initially to 90 lashes but the number was reduced to 86 for the four months they spent in custody.

The other 13 included couples punished for showing affection in public and people caught drinking or selling alcohol, who were caned 13 to 27 times.

In April, Aceh's then-governor Irwandi Yusuf signed a memorandum of understanding with the head of the provincial Law and Human Rights office, stipulating that caning can only take place inside prisons or other places of detention.

The number of witnesses was expected to be much smaller than the hundreds who regularly cheered the outdoor proceedings.

The chief of the city security office, Muhammad Hidayat, said the punishment was still being held publicly "because there was no technical guidance yet" about how to carry out the canings inside prisons.

"The authority of caning within the prisons is on the hand of the prosecutors office," Hidayat said.

The head of the Banda Aceh prosecutors office, Erwin Desman, said his office has not yet received guidance from the Law and Human Rights Ministry about preparing prisons to be a venue for the canings.

The pledge had followed international condemnation of the caning last year of two men for consensual gay sex. That public display in May 2017 intensified an anti-gay backlash in the world's most populous Muslim country, and human rights activists denounced the punishment as "medieval torture."

Aceh is the only province in Muslim-majority Indonesia that practices Shariah law, a concession made by the central government in 2001 as part of efforts to end a decades-long war for independence.

Hundreds of people have been publicly caned since the punishment was introduced in Aceh in 2005.