Malaysia's lawmakers passed an anti-terrorism bill Tuesday after more than 10 hours of heated debate over a law that reintroduces detention without trial, three years after it was revoked.

Opposition members of parliament proposed several amendments to the legislation, under which individuals can be detained for up to two years with two-year extensions thereafter, but it was voted through unchanged in the early hours of the morning.

Malaysia last had detention without trial under the Internal Security Act (ISA), which was repealed in 2012 by Prime Minister Najib Razak under his reform agenda.