Image copyright PA Media Image caption A man was shot dead by police after he attacked people in Streatham, south London

Emergency legislation to block the automatic early release of people convicted of terror offences has become law after receiving royal assent.

Deputy Speaker Nigel Evans told MPs that the Terrorist Offenders (Restriction of Early Release) Bill had become an act.

The legislation, which will affect about 50 prisoners, was drawn up following an attack in south London.

The attacker, Sudesh Amman, had recently been freed from prison.

The government wanted to pass the bill before 28 February when the next terror offender is due for release.

Sunderland shopkeeper Mohammed Zahir Khan, 42, was set to be freed after serving half of his sentence for encouraging terrorism.

The government's emergency measures, which required backing from Parliament, will now postpone his release until the Parole Board has given its approval.

The law will affect about 50 prisoners who were convicted under existing rules, which allow for release halfway through a sentence.

How does automatic early release work?

Offenders are told they are being sentenced for a fixed period and will be automatically released at the half-way point, to serve the remainder of their sentence on licence in the community.

Some offenders will have pleaded guilty on the basis that they would be given a sentence with automatic early release at the halfway point.

Their release is an automatic process and does not involve oversight of the Parole Board.

Read more from our legal correspondent Clive Coleman.

Mr Evans told MPs: "I have to notify the House in accordance with the Royal Assent Act 1967 that Her Majesty has signified her royal assent to the following Act: Terrorist Offenders (Restriction of Early Release) Act 2020."

The law will ensure terrorist offenders serve two-thirds of their sentence before they are considered eligible for release.

Those eligible will need to be reviewed by a panel of specialist judges and psychiatrists at the Parole Board.

The legislation applies to England, Scotland and Wales but the government said it intended to make provisions for Northern Ireland in a future piece of legislation, arguing that there was no need for "immediate measures" in the region.

Justice Secretary Robert Buckland said: "No terrorist should be released early only to kill and maim on our streets. Protecting the public is the government's first duty and our message is clear - enough is enough.

"From today, terrorist offenders will only be released before the end of their sentence if the independent Parole Board is satisfied they no longer pose a threat, and they will face the strictest possible conditions and monitoring upon release."

All terrorist offenders will also be subject to robust safeguards upon release, which could include notification requirements, restrictions on travel and communications, and imposed curfews.