A lawmaker involved in vetting Indonesia's proposed counter-terrorism law says a contentious provision allowing detention without trial for six months could undermine the fight against Islamic extremism.

Hanafi Rais, vice-chairman of the parliamentary committee debating the current draft of the law, said Tuesday that permitting lengthy detention in undisclosed prisons would give security forces powers that could be easily abused.

Rais said parliament should pass a law that strengthens the capacity of police to prevent attacks without giving the state excessive power.

He said lawmakers were "stunned" by the death of suspected militant Siyono in police custody earlier this year, which revealed a lack of professionalism in Indonesia's elite counter-terrorism squad.

Efforts to strengthen laws against militant activity gathered momentum after a suicide bombing in the Indonesian capital in January.