A computer hacker who was jailed after setting up a business which caused chaos all over the world must pay back nearly £70,000 or face another two years behind bars.

Adam Mudd, from Kings Langley, was just 16 when he created his Titanium Stresser program, which was used to carry out more than 1.7 million attacks on websites including Minecraft, Xbox Live, and gamers' communications tool TeamSpeak.

The Old Bailey heard he raked in more than £386,000 worth of US dollars and Bitcoins from selling the program to cyber criminals across the world.

Mudd, who is now aged 21, was sentenced to two years imprisonment last April by Judge Michael Topolski QC after admitting charges under the Computer Misuse Act and money laundering.

On Monday, the same judge said Mudd, who was not present in court, had benefited to the tune of £171,000 from his crime.

He ordered Mudd to pay back £69,629 within three months or face another two years in jail.

The court heard most of the money is in a PayPal account in Luxembourg.

During a two-day sentencing hearing last year, prosecutor Jonathan Polnay said the effect of his hacking program was truly global, adding: "Where there are computers there are attacks, almost every major city in the world, with hot spots in France, Paris, around the UK."

The court heard he carried out 594 distributed denial of service (DDoS) attacks himself, against 181 IP addresses, between December 2013 and March 2015.

They included attacks on his college, West Herts College, which brought down the network and cost about £2,000 to investigate, but caused "incalculable" damage to productivity, the court heard.

Mr Polnay said there were more than 112,000 registered users of Mudd's program who hacked some 666,000 IP addresses. Of those, nearly 53,000 were in the UK.

Among the targets was the fantasy game RuneScape, which had 25,000 attacks.

It cost its owner company £6 million to try to defend itself against DDoS attacks with a revenue loss of £184,000.

The court heard that Mudd created Titanium Stresser in September 2013 using a fake name and address in Manchester.

Mudd offered a variety of payment plans to his customers, who had to log in with a username and password.

He offered discounts for bulk purchases of up to 309.99 US dollars (£218) for 30,000 seconds over five years as well as a refer-a-friend scheme.

Mudd, from Kings Langley, Hertfordshire, pleaded guilty to one count of doing unauthorised acts with intent to impair the operation of computers, one count of making, supplying or offering to supply an article for use in an offence contrary to the Computer Misuse Act, and one count of concealing criminal property.

At his sentencing hearing, the judge noted he came from a "perfectly respectable and caring family" but the effect of his crimes caused damage "from Greenland to New Zealand, from Russia to Chile".

The court heard that Mudd, who lived at home with his parents, had previously undiagnosed Asperger syndrome and was more interested in "status" in the online gaming community than the money.