A German teenager accused of stealing unreleased tracks of Lady Gaga and Justin Timberlake and selling them to fans was jailed on Thursday for 18 months.

The 18-year old, who called himself DJ Stolen, operated from his parents' home. He was found guilty of computer break-ins by a court in Duisburg, Germany.

Another 23-year-old man, also still living with his parents, was given a suspended term of 18 months. Prosecutors said the two accused netted 15,000 euros by beating the pop stars to the launch of their own songs.

The two operated by cruising the internet looking for music-studio which might possibly house confidential music files of the stars. On determining the target they went about infecting these with trojans, a program that allows a hacker to silently take control of a computer.

They had been stealing data from US singers Kesha and Mariah Carey, Britain's Leona Lewis and Canadian-born Nelly Furtado since 2009 and were involved in online pirate marketing.

It was the fans that blew spotted the hackers by tracking the dubious sources the hackers used to sell the tracks.

It was like an addiction. I needed to get new tracks every single day, the older hacker told the court. I was respected among all the other hackers. He was let off serving jail time, after giving police a list of top music hackers and how to find them.