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.
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”.
Amman was automatically released a week ago but kept under surveillance by armed officers, who shot him after he began his attack. He wore an imitation suicide belt.
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.
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.