Image caption Usman Khan, Mohammed Shahjahan and Nazam Hussain were described as Islamic fundamentalists

Three convicted terrorists have had their sentences quashed and replaced with new terms.

The al-Qaeda inspired group had considered attacks in the UK, including bombing pubs, and setting up a jihadist training camp in Pakistan.

The Court of Appeal said indeterminate sentences given to the men should be replaced with fixed terms.

Judges said the Parole Board was best placed to decide when the men were safe to be be released from jail.

The plotters were part of a group from Stoke-on-Trent, London and Cardiff who had been watched for months by police and MI5.

In total, eight men pleaded guilty on the eve of their trial in 2012 to preparing for acts of terrorism. A ninth man pleaded guilty to a lesser charge relating to possessing extremist material.

The prosecution said plotters had discussed attacking the London Stock Exchange, pubs in Stoke and, separately, setting up a jihadist training camp in Pakistan.

But three of the Stoke men, Mohammed Shahjahan, Usman Khan and Nazam Hussein, argued they should not have received indeterminate sentences for public protection (IPPs). These special sentences meant they could be kept in prison beyond their original minimum term.

How the plot unfolded The conspiracy developed over six weeks in late 2010, before the police arrested the nine men

7 November 2010: Group meet in Roath Park, Cardiff, to discuss their ambitions

28 November 2010: Plotters meet in London to discuss targets and methodology

12 December 2010: Another group meeting at Cwmcarn Country Park, near Caerphilly. Stock Exchange bomb discussed

14 December 2010: Stoke defendants discuss their own plans, under surveillance

20 December 2010: Police arrest suspects in early hours Stock Exchange plotters: Fantasists or a threat?

In its judgement, the Court of Appeal said that it was replacing the IPPs with fixed terms and extended licences. The halfway point of the fixed terms - at which point the men are eligible for release on licence - matches the minimum the men would have originally served before they could seek to leave prison.

Lord Justice Leveson said: "There is no doubt that anyone convicted of this type of offence could legitimately be considered dangerous.

"There is an argument for concluding that anyone convicted of such an offence should be incentivised to demonstrate that he can safely be released; such a decision is then better left to the Parole Board for consideration proximate in time to the date when release becomes possible."

Shahjahan, now 29, was given a new determinate sentence of 17 years and eight months and he must serve half of that before he is eligible for release on licence.

Usman Khan, 22, and Nazam Hussain, 27, were ordered to serve at least eight years of their new 16-year sentences. All three were told they would be subject to extended licences of five years beyond their sentences, a measure which allows the authorities to recall someone to prison.

Lord Justice Leveson added: "It is not the purpose of this judgment to seek to set out guidelines or indicative sentences for terrorism which comes in many different forms

"This offence [of preparing for acts of terrorism] is particularly wide covering acts just short of an attempt to conduct that only just crosses the line into criminality."

A further member of the cell, Mohibur Rahman, also of Stoke-on-Trent, was told his sentence of five years would be cut by six months.