A long-running legal dispute over a two-second sequence of a Kraftwerk song has ruled in favour of the hip-hop producer who sampled the track.

The court case concerns a short drum sequence contained within Kraftwerk’s 1977 song "Metall auf Metall" (Metal on Metal), which was lifted by German producer Moses Pelham and looped repeatedly in Sabrina Setlur’s 1997 song "Nur Mir" (Only Me).

Since the release of “Nur Mir” almost twenty years ago, Kraftwerk founder member Ralf Hutter has argued that Pelham did not have permission to use the sample and that it infringed the group’s intellectual rights.

Having previously won backing in the German courts for damages and an injunction over the song, the case was brought before the country’s highest court when Pelham and Setlur appealed.

Now the German Constitutional Court -- the country's top legal decision-making body -- has overturned the previous verdict and ruled in favour of the defendants, saying that Pelham’s unauthorised sampling of “Metal on Metal” has a “negligible” impact on Kraftwerk and therefore “artistic freedom overrides the interest of the owner of the copyright,” reports AFP news agency.

“I’m relieved, I’m very happy with the decision,” Pelham told German television after the ruling. “For the future development of art it is a very important ruling.”

During the long-running court case, Pelham argued that sampling is a core and common component of hip-hop music and that he was not aware the two-second sequenced he looped in "Nur Mir" belonged to Kraftwerk when he wrote the track. Since the inception of hip-hop Kraftwerk has been sampled prolifically, including Afrika Bambaataa's foundational "Planet Rock."

While the ruling does not change German law, and unlimited sampling remains illegal, the decision marks a shift in the court’s interpretation of copyright in a way that could open the door to more widespread, unauthorized sampling. For future cases, the courts must give full consideration of existing laws on artistic freedom.

Referring the case back to Germany’s Federal Court to be reassessed, the Constitutional Court acknowledged the important role that sampling plays in hip hop and found that upholding Hutter’s complaint would "practically exclude the creation of pieces of music in a particular style," reports the BBC.