The government will do 'whatever it takes' to keep the public safe following attacks in London, the justice secretary has declared as he prepares to introduce emergency legislation to end the automatic early release of terrorists.

Under the Terrorist Offenders (Restriction of Early Release) Bill to be introduced to the House of Commons today, people convicted of certain offences such as training for terrorism and disseminating terrorist publications will not be released before the end of their sentence without a 'thorough' risk assessment by the Parole Board. Offenders with a standard determinate who would have automatically been released half-way will now have to spend two-thirds of their sentence in prison before they are referred to the Parole Board.

The Ministry of Justice says the legislation will halt 50 prisoners from being automatically released. Those who are released will be subject to 'robust' safeguards such as travel restrictions and curfews. The government expects the bill, which covers England, Wales and Scotland, to receive Royal assent by the end of the month.

Buckland said: 'No dangerous terrorist should be released automatically only to go on to kill and maim innocent people on our streets. Enough is enough. This government will do whatever it takes to keep the public safe, including making sure no terror offender is released early without a thorough risk assessment by the Parole Board.

'And we are not stopping there. We are stepping up de-radicalisation measures in our prisons, introducing a 14-year minimum for the worst terrorist offenders, and giving more money to the police to deal with these horrific crimes.'

Last month the Ministry of Justice and the Home Office announced it would be responding to terrorism with tougher sentencing and monitoring, including polygraph testing for individuals released on licence. The current maximum penalties and sentencing framework for terrorist offences will also be reviewed.

 Law Society president Simon Davis said: 'Applying this bill retrospectively will change the rules for many prisoners mid-sentence, meaning that time on licence will actually be spent in prisons. More prisoners will choose to appeal their sentences, placing an additional burden on our already overstretched justice system.'