Malaysian MPs approved a law on Tuesday that is designed to prevent authorities from detaining suspects indefinitely without trial.
The Security Offences Bill passed by Parliament's lower house limits detentions without charge to 28 days.
It replaces the hated Internal Security Act, which was introduced in 1960 as part of a British-led crackdown on an uprising fronted by the Communist Party of Malaya.
The new Bill still requires to go through the formality of being endorsed by Parliament's upper house and Malaysia's constitutional monarch before it comes officially into force.
It is the centrepiece of Prime Minister Najib Razak's pledge to reform decades-old laws that opposition and rights groups condemn as repressive.
Rights activists nevertheless argue that the proposed law remains vulnerable to abuse while opposition leaders insist that the decision is little more than a government ploy to introduce superficial changes ahead of national elections expected within months.