PARIS — The highest court in the European Union said on Thursday that Internet service providers could not be required to monitor their customers’ online activity to filter out the illegal sharing of music and other copyrighted material.

The ruling, by the European Court of Justice in Luxembourg, is a setback for a Belgian group representing music copyright owners, which had sought tougher measures to crack down on online file sharing.

The organization, Sabam, had sued a Belgian Internet provider, Scarlet Extended, saying its customers were illegally sharing music files.

Sabam had won a ruling in a Belgian court, which said Scarlet should have to install a system to filter out any unauthorized exchanges of songs on its own, not just in response to complaints from copyright holders.