Parliament's passing of a highly contentious Prevention of Terrorism Act comes amid a crackdown on freedom of speech and civil rights where dozens of people have been arrested under a draconian Sedition Act and face up to five years jail.
The government argues the power to detain terrorism suspects without trial, court challenges or legal representation is necessary to combat the rising threat of extremists drawn to groups such as the Islamic State in Iraq and Syria.
Police claim that 17 militants arrested this week across Malaysia were plotting to attack army camps and police stations. None of them have been named.
Authorities have repeatedly warned that dozens of people from Muslim-majority Malaysia have volunteered for IS jihad.
"This is a real threat and prevention measures are needed," said Home Minister Zahid Hamidi.
But opposition MPs, human rights and civil society groups have attacked the new anti-terror law, which they say is a revival of a colonial-era Internal Security Act that was used to silence the government's opponents before it was repealed in 2012, as Malaysia Prime Minister Najib Razak pledged a new era of greater civil liberties.
Analysts say the Prime Minister's hard line is in response to criticisms of him by conservative figures in his ruling United Malays National Organisation (UMNO), including former prime minister Mahathir Mohamad, who has called on him to resign.
Mr Najib is facing an open revolt within the party after losing the popular vote at elections in 2013 but managing to cling to power because of a gerrymandered voting system.
The new law allows suspects to be held for two years, renewable for an unlimited period, on the decision of a Prevention of Terrorism Board, whose members are appointed by the country's sultan.
The government has also retreated from a pledge to abolish the sedition law and moved on Tuesday to increase the maximum jail sentence for violators to 20 years,
Human Rights Watch declared the anti-terrorism law a "giant step backwards for human rights, raising serious concerns that Malaysia will return to practices of the past when government agents frequently used fear of indefinite detention to intimidate and silence outspoken critics".
Opposition MP N. Surendran said the law is a "grievous blow to democracy".
"I don't think there is any basis for the government's claim that this law is needed to contain [the Islamic State]," he said.
Amnesty International said by abandoning people to rot in jail without a judicial process and proof that they have committed a crime is "just like aimlessly stabbing in the dark".
"Indefinite detention without trial is contrary to human rights law and it will not stop terrorism," said Hazel Galang-Folli, Amnesty's researcher in Malaysia.
Ms Galang-Folli said the new law has not included necessary safeguards to ensure fair trails and respect for human rights in the country where use of the former Internal Security Act created a climate of fear for decades.