Tunisia's parliament has voted overwhelmingly to pass the country's new anti-terror law despite fears by rights groups that it could be abused.

In a late-night session Friday, 174 deputies voted for the legislation, 10 abstained and no one voted against it.

The law replaces earlier legislation from 2003 and is designed to facilitate efforts to combat terrorism.

Discussion over the law, especially whether it might open the way to rights abuses, stretched on for years but was given new impetus with a pair of devastating attacks on tourists in March at a Tunis museum and then last month a beach resort.

The sole country to emerge from the 2011 uprisings with a democracy, Tunisia has been targeted by militant groups.