Media companies whose business models have been upended by the internet have long complained about Google and other online platforms profiting from their content without compensating them adequately.

On Tuesday, the media industry got some help with the European Parliament’s adoption of a copyright law that requires technology platforms to sign licensing agreements with musicians, authors and news publishers in order to post their work online.

The new law is meant to force tech firms to aggressively remove unlicensed copyrighted material from their websites proactively, rather than waiting for complaints to come in before acting.

The vote followed one of the most intense lobbying campaigns in years over a European Union law. Digital rights activists and tech industry representatives who opposed the law said it would result in censorship while limiting the sharing of information. The measure’s supporters said it would protect Europe’s creative industries and force companies to pay for the content they share online.