Indonesia's conservative Aceh province will no longer allow canings for violations of Shariah law to be carried out in public, its governor said.
The move was apparently in response to international condemnation of the caning last year of two men for gay sex.
A memorandum of understanding signed by Aceh governor Irwandi Yusuf and Yuspahruddin, head of the provincial Law and Human Rights office, stipulates that caning can only take place inside prisons or other places of detention.
It says adults can still witness the punishment but recording will not be allowed.
The numbers of people will be much smaller than the hundreds who regularly cheered the outdoor proceedings.
"The aim of holding the caning inside prison is to prevent it from being watched by children, without cameras and hand phones," Irwandi said after signing the memorandum, witnessed by Indonesian minister of law and human rights Yasonna Laoly.
Human Rights Watch called for Aceh to abolish caning and the laws that allow it.
It said caning remains a form of torture whether it is carried out in public or not.
"Torture is torture whether you do it in public, outside a mosque after Friday prayers, or inside a room, banning anyone from taking a picture," said the group's Indonesia researcher Andreas Harsono.
Human Rights Watch also appealed for Aceh to release four people arrested in March for same-sex conduct, who each face up to 100 lashes under the province's Islamic criminal code.
Hundreds of people have been publicly caned since the punishment was introduced in Aceh in 2005.
Aceh is the only province in Muslim-majority Indonesia that practises Shariah law, a concession made by the central government in 2001 as part of efforts to end a decades-long war for independence.
Its implementation has become increasingly harsh and now also applies to non-Muslims.
Last May, the province for the first time caned two men for gay sex after vigilantes broke into their home and handed them over to religious police.
Footage of the men, both in their twenties, being caned dozens of times in front of a baying crowd galvanised international criticism of Shariah law in the province and further tarnished Indonesia's reputation for moderation.
Making the canings private was proposed in July last year after Yusuf met with President Joko "Jokowi" Widodo amid concerns that tourism and investment could be affected.
The last caning was on February 27th, when five people including two Christians convicted of gambling were punished in the provincial capital Banda Aceh.
- Press Association