An attempt by terrorism offender Mohammed Zahir Khan to overturn a ban on early release from prison has been thrown out by the High Court.
Two judges said Parliament had been right to end automatic release halfway through a sentence.
The new rules were rushed through after two terror attacks by released offenders.
The High Court judges said the changes had been a “logical and rational” response to the threat.
The ruling means that approximately 50 serving prisoners will be kept inside for longer.
Until this year, anyone convicted of a terrorism offence who was not on a life sentence could expect to be automatically released at the halfway point of their jail time.
They would then serve the rest of the sentence under conditions and monitoring in the community – including restrictions on where they could go and who they could meet.
Offenders jailed for more than two years must now serve at least two-thirds of the time inside before they can be considered for release – but only if the Parole Board says that they are safe to be let out.
Those changes followed two separate attacks by former prisoners.
Last November, Usman Khan, who had been released at the halfway point of his 16-year sentence, killed Saskia Jones and Jack Merritt, two prisoner rehabilitation volunteers, at London Bridge.
Then in February, Suddesh Amman attacked and stabbed people in south London, days after he left jail.
The changes to how releases should be managed applied to all serving prisoners – and immediately blocked the release of Mohammed Zahir Khan who had been expecting to come out on 1 March.
The former shopkeeper from Sunderland had admitted encouraging terrorism, disseminating a terrorist publication and stirring up racial hatred against Shia Muslims, a minority group targeted by extremists.
Khan, jailed in 2018 for four and a half years, must now wait until at least November before he can be possibly released.
He challenged the new rules, arguing they were discriminatory and unjust because they changed the nature of the sentence he had been given in court.
What are the rules for releasing terror offenders?
Why do some prisoners serve only half their sentence inside?
But rejecting the challenge, two High Court judges concluded that Parliament had not breached Khan’s human rights.
‘Entirely legitimate response’
Mr Justice Garnham said: “In our judgment, it is impossible sensibly to regard a terrorist offender as in an analogous position to an ordinary offender.
“The nature of the offending is different, the need for punishment is different, the way the offenders have to be managed in custody is different, the risks they pose on release into the community are different.
“Faced with the real and immediate threats to public safety demonstrated by the attacks of November 2019 and February 2020, altering arrangements for the early release of terrorist prisoners was a logical and rational response.
“The offending in issue was especially grave, involving as it did random knife attacks on innocent bystanders causing fatal injuries.
“Keeping terrorist prisoners in custody for a longer proportion of their sentence, and requiring Parole Board approval before early release, was an entirely legitimate response.”
A Ministry of Justice spokesperson said: “Our new laws protect the public by keeping terrorists off our streets for longer and we welcome this ruling.”