The state government will introduce what it describes as the nation's toughest terror laws and plans to keep inmates convicted of terror offences or suspected of having been radicalised behind bars after their sentence is over if they continue to pose a threat.

The state government and intelligence agencies will apply to the Supreme Court for the extension of custodial sentences or supervision by authorities of prisoners who pose a credible threat to the community for up to five years, the Premier announced.

Applications could also be made for inmates charged with offences unrelated to terrorism but who are suspected of having become "radicalised" in jail.

"NSW will be the first state in Australia to address this," Ms Berejiklian said. "We know these are tough laws but unfortunately these circumstances are here because of what we see around the world and around Australia."