Germany's highest civil court has dealt electronic band Kraftwerk a blow in ruling that sampling music does not in principle violate copyright.

Thursday's decision overturns a Hamburg state court ruling in Kraftwerk's favor that said reusing even the shortest bit of a song infringed on copyright. The Hamburg court will now have to take up the case again.

The civil court ruling, however, forbids sampling of a song melody and insists that the sample must be part of a completely new musical work bearing no resemblance to the original.

Kraftwerk had sued German rap producer Moses Pelham for using a two-second sample from their 1977 track "Metal on Metal" in the rhythm sequence in the song "Nur Mir" by Sabrina Setlur that appeared in 1997.