The government has responded to the knife attack in Streatham by announcing sweeping legal changes to prevent the automatic release of terrorist offenders.

In a hastily arranged House of Commons statement a day after the south London stabbings, the justice secretary, Robert Buckland, set out plans for emergency legislation that would stop any terror offenders being released without parole board risk assessments.

And in a move that is likely to face legal challenge, Buckland said that the proposals would apply to existing as well as future offenders, meaning prisoners currently due for release halfway through their sentence could now face years more in prison.

The move – which critics view as a breach of norms governing retrospective legislation – came in response to the revelation that neither the police nor the parole board were able to stop the release one week ago of 20-year-old Sudesh Amman, who was shot dead by plainclothes officers after he stabbed two people in south London.

The government faced immediate accusations of developing policy on the hoof, ignoring the crisis in prisons and scapegoating “the influence of lawyers” on sentencing policy through anonymous briefings.

But Buckland hinted that the government might push for even more draconian powers that would prevent prisoners convicted of terror offences being released until the Parole Board considered them to pose no risk.

Announcing the changes, the justice secretary told the House of Commons: “Yesterday’s appalling incident makes the case plainly for immediate action. We cannot have the situation, as we saw tragically in yesterday’s case, where an offender – a known risk to innocent members of the public – is released early by automatic process of law without any oversight by the Parole Board.

“We will be doing everything we can to protect the public, that is our primary duty. We will, therefore, introduce emergency legislation to ensure an end to terrorist offenders getting released automatically having served half of their sentence with no check or review.

“The underlying principle has to be that offenders will no longer be released early automatically and that any release before the end of their sentence will be dependent on risk assessment by the Parole Board.

“We face an unprecedented situation of severe gravity, and as such it demands the government responds immediately and that this legislation will apply to serving prisoners.”

All terrorist offenders would have to serve two thirds of their sentence before being eligible for a Parole Board assessment, Buckland added.

Hinting that further restrictive regimes may be introduced, he said: “We will review whether the current maximum penalties and sentencing framework for terrorist offences is indeed sufficient or comprehensive on the underlying principle that terrorist offenders should no longer be released until the Parole Board is satisfied that they are no longer a risk to the public.”

The changes are unlikely to affect many prisoners as a significant number are already serving either life sentences or extended determinate sentences, both of which require Parole Board intervention before release. A small number of terrorist offenders, like Amman, are sentenced to standard determinate sentences that under current legislation are eligible for automatic release at the halfway point.

The proposals come a week after a broad package of counter-terrorism measures was announced by the Home Office and Ministry of Justice, which included plans to introduce lie detector tests for terrorist offenders as well as the recruitment of specialist counter-terrorism probation officers.

Among the proposals, some of which are to be introduced in a new counter-terrorism bill, are plans to end early release on licence for terrorist offenders who receive extended determinate sentences and a mandatory minimum of 14 years in prison for those convicted of preparing acts of terrorism or directing a terrorist organisation.

Clare Collier, advocacy director for Liberty, the civil liberties and human rights group, immediately questioned the legality of a retrospective change to sentence conditions.

She said: “The government’s response to recent terror attacks is a cause of increasing concern for our civil liberties.

“From last month’s kneejerk lie detector proposal, to today’s threat to break the law by changing people’s sentences retrospectively, continuing to introduce measures without review or evidence is dangerous and will create more problems than it solves.

“It’s clear the UK’s counter-terror system is in chaos and desperately needs proper scrutiny and review.”

Joanna Cherry, the justice and home affairs spokesperson for the SNP at Westminster, immediately highlighted difficulties with retrospectively altering legislation.

She said: “He [Buckland] has said he intends to introduce emergency legislation making retrospective provision in relation to those sentenced before the law was changed I wonder can he assure me that the usual legal difficulties with retrospective legislation have been addressed to his satisfaction.”

Buckland argued that the changes related to the “administration” of a sentence, not its length or type. He said: “We are talking about the administration of a sentence – the way it is dealt with, as opposed to the length of it or the type of it. I think for that reason looking at the administration of a sentence is entirely appropriate and what I would regard as a reasonable approach.”

Cherry hit out at reports that an anonymous No 10 source had been briefing journalists that “the system for dealing with terrorism has significant problems because of the shocking influence of lawyers on policy”.

“Will [Buckland] join me in condemning these anonymous briefings and will he agree with me that there’s plenty of room for introducing robust anti-terrorism policies that are rule-of-law compliant?”

Richard Burgon, the shadow justice secretary, attacked the state of the prison and probation service amid questions raised over the effectiveness of rehabilitation in prison and monitoring terror suspects in the community.

“Our priority must be to keep the public safe. But to be clear, the government cannot use sentencing as a way of distracting from their record of bringing the criminal justice system to breaking point.”

In a statement, the Parole Board said: “Given the recent events at London Bridge and Streatham, the Parole Board understands and welcomes the government’s plans to ensure that terrorist offenders are not released automatically, as occurred in these incidents, but are instead considered by an independent panel of the Parole Board.

“Our overriding priority is the protection of the public. The independent Parole Board will not direct the release of an offender unless we are satisfied, taking account of all the evidence, that detention is no longer necessary for the protection of the public.

“The board’s focus is rightly on those who have committed the most serious criminal offences and it is vital that the most serious offenders are subject to a proper assessment before their release.”