Megaupload's Kim Dotcom granted bail in New Zealand

The founder of file-sharing website Megaupload has been granted bail by a New Zealand court, despite previously being deemed an "extreme" flight risk.

The 38-year-old, born in Germany as Kim Schmidt, has been in prison in the country since January after a raid on his home by police at the request of the US authorities.

He faces charges of masterminding one of the biggest copyright infringement rackets in US history, which is estimated to have cost content producers such as the Hollywood studios and major record labels more than $500m (£320m) in lost revenue.

However, North Shore District judge Nevin Dawson overturned two previous bail rulings, saying that Dotcom's flight risk had been reduced as his funds were all seized and no new bank assets had been uncovered.

Speaking to reporters in Auckland, Dotcom said that he was "relieved to go home and see my family, my three little kids and my pregnant wife".

Last week, Dotcom was charged with three new counts of criminal copyright, and five new wire fraud counts. He was already up against one count of racketeering, two counts of copyright infringement and one court of money laundering.

The US Justice Department and FBI claim that Megaupload, which was shut down last month, made millions by allowing users to share pirated copies of movies, music and other content.

They are seeking to extradite Schmitz, and his three other co-defendants, who had earlier been granted bail, to face the charges.

It is thought that the US authorities are not realistically expecting the criminal charges to stick, but are confident on the copyright infringement counts.

Following his arrest in January, various details have emerged about Dotcom's extravagant lifestyle, including his sprawling NZ$30m (£15.75m) mansion in New Zealand, extensive art collection and millions of dollars worth of luxury cars.

He was known to sometimes spend $100,000 on a single lunch, and when he took part in the Gumball 3000 rally in the US he had a team of Mercedes mechanics follow him ahead in a jet and a film crew track his progress.

Dotcom has denied any criminal misconduct and said that he will fight extradition to the US.