The law passed in the wake of recent bombings faces criticism for granting military involvement in internal security.

Indonesia’s parliament has unanimously approved a controversial “anti-terror” law that grants the military direct involvement in “counterterrorism” operations and internal security matters.

Following a series of suicide bombings carried out by supporters of Islamic State of Iraq and the Levant (ISIL), the new legislation includes a clause that states combatting “terrorism” is part of the military’s operations, but that it can only get involved after a request from the police and with presidential approval.

The new laws also give the police the power to detain “terror suspects” for as long as 21 days without charge, and for another 200 days if police need time to gather evidence.

Those convicted of smuggling explosives or other chemicals and weapons into or out of the country for “terrorism” will face a maximum penalty of death.

Last week, more than 20 people were killed in separate suicide attacks on churches and a police station by two families – including a nine and 12-year-old girl – in Indonesia’s second-biggest city Surabaya.

The families had ties to a local group that had pledged allegiance to ISIL, also known as ISIS, which claimed responsibility.

According to authorities, close to 1,000 young men travelled to fight with ISIL in Syria and Iraq between 2014-2018, with more than 500 estimated to have returned.

Wrong approach

First proposed in 2016, the laws languished in parliament amid concerns over crucial details, including how to define “terrorism”, and after some parties objected to the greater role being granted to the military.

But after last week’s attack, President Joko Widodo threatened to impose the changes by special decree if parliament did not rapidly approve them.

Al Jazeera’s Scott Heidler, reporting from Jakarta, said it was unclear what the details of the military’s involvement were and they would be addressed in a separate decree within the next year.

Rights activists had also expressed concerns that the bill’s vague wording could open the door to a crackdown on any group seen as a threat.

Ahmad Taufan Damanik, the chair of Indonesia’s National Commission on Human Rights, said granting the military direct involvement in “counterterrorism” operations, was the wrong approach.

“We agree that we need to capitalise, maybe develop a special unit or police, or other law enforcement, but not [include] the military in this bill,” he told Al Jazeera.

“It should be a law enforcement approach.”

Indonesia – which is set to host the Asian Games in three months and an IMF-World Bank meeting in Bali in October – has long struggled with “counterterrorism” policing.

Security forces have arrested hundreds of men since the Bali bombing in 2002 that killed more than 200 people, including locals and foreign tourists.

However, the country’s elite police squad, Densus 88, says it has thwarted as many as 23 “terror” plots in the past two years, and arrested more than 360 suspected “terrorists”.