A man who repeatedly breached a terrorism prevention order just days after he left HMP Wandsworth has been jailed for two years.

The man, who can only be known as KG, admitted 12 breaches of his terrorism prevention order within days of his release from the prison last month.

After he left prison, KG was subject to an order under the Terrorism Prevention and Investigation Measures Act, also known as a TPIM, which places restrictions on a person's movement, communication and finances.

The Old Bailey heard KG was only allowed to withdraw £75 a week from his bank account, would have to notify the Home Office about his bank statements and could not have more than £75 on his person.

However, after the order was imposed upon his release in January, KG repeatedly withdrew excess cash and did not give the Home Office the date of when his bank statements would be produced.

KG was serving a 13-month sentence for a racially aggravated assault and did not have any previous convictions for terror offences, the prosecution said, and there was no suggestion his money had been used in connection with terrorism.

Jessica Hart, prosecuting, said KG withdrew hundreds of pounds, including almost £500 which could not be accounted for despite reminders from the Home Office.

She said: "£775 was withdrawn within the eight-day period. Of this, £283 was spent at JD Sports and £11.54 in Tesco.

"There was £494.88 which could not be accounted for. It is the Crown's case that some or all of that has been spent on drugs."

After his arrest on Tuesday, Mr Justice Sweeney handed KG a sentence of two years immediate custody on Friday.

Mr Justice Sweeney said KG's breaches were "intentional and persistent" and his more than 20 previous convictions showed a "contempt with compliance with the law".

He continued: "Whilst no terrorist activity or actual harm was done, there was in my judgment a significant risk of harm given your history of illegal drugs and their potential to cause disinhibition.

"It has been submitted on your behalf that your sentence should be suspended. I disagree.

"Subject to any amendments of the law in the interim, you will serve half of that sentence in custody and the rest on licence."

The judge said the punishment was intended to deter others from breaching TPIMs.

He said: "Terrorism Prevention and Investigation Measures notice may only be issued by the Secretary of State if it is certain, on the balance of probabilities, that an individual is involved or has been involved in terrorist-related activity which is now and is necessary to protect the public.

"Full compliance is therefore essential in the public interest and breaches of them are serious offences."

TPIM orders replaced the controversial control orders in 2011.

The Government said they would serve as a "less intrusive system" and needed a higher threshold than control orders to be implemented.

The orders, which can last for a maximum of two years, can involve restrictions including relocation to another part of the country, electronic monitoring and limits on their use of computers and phones.

In the wake of the Streatham terror attack on February 2 Lord Carlile, the UK's independent reviewer of terrorism legislation from 2001 to 2011, called for control orders to be returned.