Just days after an alleged plot to attack Via Rail was foiled, the Harper government has passed legislation that grants police extra powers in the fight against terrorism – but ones that come at a controversial cost to civil liberties in Canada.

S-7, the Combatting Terrorism Act, should become law in a matter of months, if not weeks, after clearing the Commons on Wednesday evening. It was previously passed in the Senate.

The bill resurrects two anti-terrorism powers that Parliament granted to Canadian authorities after the Sept. 11, 2001, terrorist attacks but expired in 2007 because they were time-limited provisions and the minority Conservative government lacked the votes to extend them. Neither measure had been used.

Story continues below advertisement

The law will allow police to detain people pre-emptively and hold them for as long as three days without charges and would give authorities power to compel testimony through so-called investigative hearings at which people are brought before judges to answer questions.

"Terrorism and violent extremism are real threats to Canada," Public Safety Minister Vic Toews said on Wednesday after the bill passed by a vote of 183-93 in the Commons. The Liberals backed the legislation.

The NDP, the only major party to oppose S-7, said the record since 2001 demonstrates that Canada has managed to prosecute the fight on terrorism without requiring these powers that encroach on civil rights.

"In that 12 year-period, the government was able to get investigations completed, to get convictions like the [Mohammad Momin] Khawaja case," NDP public safety critic Randall Garrison said.

A spokesman for the Canadian Bar Association said it did not feel the new measures will be effective in combatting terrorism and called them inconsistent with Canada's legal traditions.

One security law expert said the federal government has done a poor job of explaining the rationale for this counterterrorism law.

Craig Forcese, vice-dean of the University of Ottawa's law school and a specialist in national security law, said the measures are "extreme provisions for when everything else has failed" and that it makes sense to lay out rules for using such tools rather than not addressing such circumstances.

Story continues below advertisement

Prof. Forcese said the measures are designed for when "the wheels fall off, the lights are blinking red and something's going to happen and you need to disrupt things.

"It's like any other emergency law; it's unnecessary until it is necessary. …Do you want to have it on the books with checks and balance to deal with this rare, but at least theoretically possible scenario, or do you want to invent things on the fly when that scenario arises? My answer is put it on the books."

He said he believes the bill should have more carefully limited the use of preventive detention to circumstances where a threat is immediate and pressing.

But the bill lacks this restrictive language, Prof. Forcese said, which could leave the government open to "a debate as to whether this power really is intended for those dire circumstances."

The legislation should also have included firm obligations to make reparations if the authorities use the powers to apprehend people mistakenly. "It seems entirely appropriate to build in a compensatory mechanism."

The legislation would also make it a federal crime to leave or try to leave Canada for the purpose of committing terrorism or attending a terrorist training camp, although the Canadian Bar Association has pointed out that this duplicates existing prohibitions in other laws.

Story continues below advertisement

The Harper government invoked the April 15 Boston Marathon bombings to justify their decision to expedite passage of S-7, which has been moving relatively slowly through Parliament since being introduced in the early months of 2012.

Neither of the restored measures were used when they were last on the books, the federal Department of Justice confirmed on Wednesday. In 2003, during the investigation into the bombing of an Air India plane, a court order was granted to authorize an investigative hearing. After a legal challenge, the Supreme Court ruled in 2004 that the investigative hearing provision was constitutional. But the hearing was never held.

The Liberal decision to back the Conservative bill reflects a change from 2007, when both the Liberals and NDP voted down a proposal to extend the police powers. The Liberals said their switch reflects reviews and studies on the topic that were completed after the last vote and it recognizes that in "extreme circumstances," with appropriate safeguards, these provisions may be required.