The Attorney-General's office is contemplating tougher terror laws, after the state failed in a last-ditched bid to slap an extended supervision order on a convicted terrorism “activity offender” who had an “obsession” with the Islamic State.

Mohamed Naaman, 43, has a well-documented history of violence, including brandishing a 35cm knife at two police officers in 2013 and attempting to slash a prison guard with a piece of glass in 2015.

Mohamed Naaman. Credit:Nine News

Naaman violated his parole for that offence in late 2016 by travelling to Lebanon, and was re-incarcerated when he returned to Australia in May last year.

An interim supervision order was granted in August, but an extended order was rejected by the Supreme Court in October and the Supreme Court's Court of Appeal in late December - leading the NSW Attorney-General's office to consider changing the legislation.