A co-founder of the Swedish file-sharing website The Pirate Bay was sentenced on Friday to three and a half years in prison, in what the prosecutor called Denmark's biggest-ever hacking case.

Gottfrid Warg, 30, also known under his hacker alias "Anakata", was found guilty of hacking into the mainframe of IT provider CSC in Denmark, accessing the Danish Civil Registration System and local police's criminal register in 2012.

When sentencing, the Court of Frederiksberg in Copenhagen said the attack was systematic, intensive and took place over a long period of time.

It said in a news release on Friday significant amounts of highly sensitive personal information had been downloaded in the hacking campaign.

Warg's accomplice, a 21-year-old Dane who successfully applied for his name not to be made public, was sentenced to six months in prison for complicity in a hacking attempt made by Warg in February 2012 but walked free from the court as he had already served 17 months in pre-trial detention.

The Pirate Bay, launched in 2003, provided links to music and movie files stored on other users' computers. Swedish subsidiaries of prominent music and film companies had taken the company to court, claiming damages for lost revenue.

Warg has been in pre-trial detention in Denmark since November 2013, when he was extradited from Sweden after serving a jail sentence there.

In Sweden Warg had been convicted of copyright theft due to his involvement in The Private Bay, and separately for hacking the mainframe of IT consulting firm Logica, which did work for the Swedish government and a bank.

Warg was arrested in Cambodia in 2012 and was extradited to Sweden to face the charges there.