Image copyright AP Image caption Hung Chung-chiu, 24, died after being punished for misconduct

An amended law has come into effect in Taiwan which strips its military of the power to prosecute and punish its own personnel during peace time.

The transfer of more than 350 urgent cases of alleged wrongdoing by military personnel from military to civilian courts has begun.

The change was made following protests over the death of a conscript soldier who was punished for misconduct.

Military jails are to be closed and military courts shut down by January.

The cases transferred are considered the most urgent - they involve alleged inhumane treatment of subordinates or unjustified punishment by superiors.

More than 250 armed service personnel jailed in the military are also being transferred to civilian prisons to serve out the remainder of their sentences.

This is a significant change for Taiwan, which for decades was ruled under martial law, says the BBC's Cindy Sui in Taipei.

Resentment against the military is still strong not only because of the martial law era, but because it is widely considered as a place for profiteering and bullying, our correspondent adds.

Earlier this month, tens of thousands rallied in the capital, Taipei, to protest against the death of Hung Chung-chiu, 24, who died of organ failure brought on by heatstroke.

Cpl Hung was held in solitary confinement for bringing a mobile phone with built-in camera onto his military base - and was then subjected to arduous punishment exercises in the hot sun.

His case saw some 18 army officers being charged, and the resignation of the defence minister.

President Ma Ying-jeou has also publicly apologised and promised justice for the family.