Emergency legislation will be introduced to end the automatic early release from prison of terror offenders, the government has said.
Justice Secretary Robert Buckland told MPs the change would apply to both current and future offenders.
Terror offenders will only be considered for release once they have served two-thirds of their sentence and with the approval of the Parole Board.
It follows two attacks by men convicted of terror offences in recent months.
On Sunday, Sudesh Amman, 20, was shot dead by police in Streatham, south London, after stabbing two people. And in November two people were killed near London Bridge by Usman Khan.
Amman was released from prison towards the end of January, while Khan was out on licence from prison when he launched his attack in central London.
Mr Buckland said the latest attack made the case “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,” he said.
He said the new legislation would mean people convicted of terrorism offences will no longer be released automatically after they have served half of their sentence.
Because we face “an unprecedented situation of severe gravity”, the legislation will also apply to serving prisoners, Mr Buckland said.
The Ministry of Justice said the legislation would be introduced “when parliamentary time allows”.
The government will also consider making new legislation to ensure that extremists are more closely monitored on release and will review whether the current maximum sentences for terrorist offences are sufficient.
Human rights group Liberty described the government’s actions after recent terror attacks as a “cause of increasing concern for our civil liberties”.
Clare Collier, an advocacy director for the campaign group, said: “From last month’s knee-jerk 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.”
Responding to the government announcement in the Commons, shadow justice secretary Richard Burgon said the justice system was in “crisis” due to funding cuts.
“The government cannot use sentencing as a way of distracting from their record of bringing the criminal justice system to breaking point,” he said.
Although plans for the Parole Board to decide if people convicted of terrorism offences should be released after serving two thirds of their sentence were in the Queen’s Speech, there were no proposals at that stage for the measures to apply retrospectively.
All that changed after the Streatham attack – the third incident involving convicted Islamist extremists in two months.
Ministers are clearly concerned about the risks posed by other prisoners serving sentences for terrorism who are due to be let out: there’s about one release, on average, every week.
But the measures, if approved by Parliament, will almost certainly be the subject of a challenge in the courts. Is it fair that a prisoner who’s been convicted and sentenced under one set of rules suddenly finds themselves locked up for longer under a different set of rules?
The government is likely to justify its approach on the grounds of national security, so prepare for an epic legal battle that may well end up at the Supreme Court.
Amman was shot dead on Streatham High Road on Sunday afternoon after stabbing two people in what police called an Islamist-related terrorist incident. He wore an imitation suicide belt.
He had been released from prison about a week ago after serving half of a sentence for terror offences, and was under police surveillance.
Witnesses heard gunshots as armed officers shot Amman dead. Scotland Yard said armed officers were following Amman on foot as part of a “proactive counter-terrorism surveillance operation” in Streatham High Road.
Three people were taken to hospitals, including the two stabbing victims.
One victim, a man in his 40s, is now said to be recovering after sustaining injuries that were initially thought to be life-threatening. Another, a woman also in her 40s, has been discharged from hospital.
A third woman in her 20s suffered minor injuries, thought to have been caused by broken glass from the gunfire.
The attack comes after convicted terrorist Khan fatally stabbed Saskia Jones and Jack Merritt at Fishmongers’ Hall near London Bridge on 29 November last year.
Khan had been released from jail on licence in 2018, half-way through a 16-year sentence for terrorism offences.
This prompted a raft of measures to be proposed by the Home Office in January.
The so-called Counter-Terrorism Bill would also ensure people convicted of serious offences, such as preparing acts of terrorism or directing a terrorist organisation, spend a minimum of 14 years in prison.