The decision of the Aceh Provincial Government in Indonesia to move flogging from public into more closed spaces has drawn resistance from the public and the local parliament.

Key points: New law moves canings inside prisons, forbids people from recording them

New law moves canings inside prisons, forbids people from recording them Members of Islamic Defender Front protested against the change

Members of Islamic Defender Front protested against the change Government says public caning has caused a slowdown in outside investment

On April 12, Aceh's governor Irwandi Yusuf signed a new rule to ban the whipping of criminals in public.

Under the new rules, it is forbidden to record people being caned with a rattan stick — crowds often film the spectacle on smartphones — and only journalists and adults can witness the punishment inside private prisons.

But members of a controversial group, Islamic Defender Front (FPI), staged a public protest in front of the governor's office over the weekend — the protest turned violent and several people were arrested by the police.

The local head of Islamic Defender Front, Muslim at-Tahiry, said he opposed the decision to move caning away from the public eye.

"Based on Islamic law, the whip should be done in public, witnessed by the believers," he said.

"That is to be a lesson for the perpetrators and the people who watch it. So they really should be embarrassed. This works as a deterrent."

The local parliament has also rejected the new rule and filed a complaint to the Supreme Court in Jakarta.

"A special session of Aceh's parliament has officially decided that parliament will take legal action against the governor's decision and we will ask that the regulation be revoked," MP Azhari Cage said.

Mr Cage added that the parliament also questioned the reasoning of the Aceh Provincial Government in linking public canings with startling investors and slow-down in investment in the province.

'The reason is for children to not see the flogging'

The public will be banned from recording canings under new laws in Aceh. ( AP: Heri Juanda )

"Since the law has been in force, no society or investors have protested," he said.

"We agree that investment in Aceh should be improved but it is related to government and community support, the availability of things like electricity. This has nothing to do with the flogging."

But a lecturer from the Ar Raniry State Islamic University of Banda Aceh, Fuad Mardhatillan, told the ABC the governor's decision to stop public caning did not violate Aceh's Islamic criminal laws, otherwise known as Qanun Jinayat.

"The Qanun does require whipping in a public place, but by moving to the more closed place like in prison in my opinion does not limit public access," he said.

"The reason is for children to not see the flogging, which I think is good from psychology point of view."

Flogging can be used as punishment in Aceh from crimes against Sharia law, such as engaging in gay sex. ( ABC News: Adam Harvey )

In his press statement after signing the new law, Mr Yusuf maintained that its primary aim was to prevent children witnessing the flogging.

"This is not reducing the punishment, I just want to make sure the implementation of the punishment is not being attended by children," he said.

"But society is not forbidden from witnessing the flogging."

He admitted the punishment often triggered criticism internationally and the rule revision was necessary to curb this outside protest.

"In order for investors not to be worry about investing in Aceh, this can also help to increase economic growth," Mr Yusuf said.