A German court has ruled that Google's video-sharing service YouTube is responsible when users post copyrighted music clips without permission.

The German royalty collections body GEMA sued YouTube over 12 specific music videos to which it holds the rights.

The test case could have huge implications for YouTube if it has to pay royalties for all clips posted on its website.

The court ruled that YouTube is responsible for making sure that any uploaded videos do not breach copyright and ordered it to take down seven of the 12 clips concerned.

YouTube must install filters to prevent users from uploading copyrighted music videos without permission, it said.

If one of the seven videos concerned are re-posted on the website, YouTube could face a fine of up to €250,000, according to German law.

YouTube said it took no responsibility for what users did, but responded when told of copyright violations.

GEMA, which represents about 60,000 German songwriters and musicians, expressed satisfaction with the ruling.

"YouTube must take measures to prevent violations in future," said GEMA's lawyer Kerstin Baecker.

"The court has clearly rejected the argument that YouTube as a host is not responsible for users' content."

The spat erupted after a licensing agreement between YouTube and GEMA expired in 2009.

Negotiations on a replacement agreement have so far foundered owing to differences between the two sides.

Google Germany spokesman Kay Oberbeck said: "I now hope GEMA will return to the negotiating table."

Mr Oberbeck described the ruling as "an important partial victory. The court has created legal certainty for platforms of user-generated content".