Internet companies can be made to remove irrelevant or excessive personal information from search engine results, Europe's top court ruled on Tuesday in a case pitting privacy campaigners against Google.

The Court of Justice of the European Union (ECJ) upheld the complaint of a Spanish man who objected to the fact that Google searches on his name threw up links to a 1998 newspaper article about the repossession of his home.

The case highlighted the struggle in cyberspace between free speech advocates and supporters of privacy rights who say people should have the "right to be forgotten" — meaning that they should be able to remove their digital traces from the internet.

It creates both technical challenges and potential extra costs for companies like Google, the world's no.1 search engine, and Facebook.

Google can be required to remove data that are "inadequate, irrelevant or no longer relevant, or excessive in relation to the purposes for which they were processed and in the light of the time that has elapsed," said judges at the Luxembourg-based court. The ECJ said the rights of people whose privacy has been infringed outweighed the general public interest.

Google said it was disappointed with the ruling, which contradicted a non-binding opinion from the ECJ's court adviser last year that said deleting sensitive information from search results would interfere with freedom of expression.

"We are very surprised that it differs so dramatically from the Advocate General's opinion and the warnings and consequences that he spelled out. We now need to take time to analyze the implications," said Google spokesman Al Verney.

The European Commission proposed in 2012 that people should have the "right to be forgotten" on the internet. This was watered down by the European Parliament last year in favour of a "right to erasure" of specific information.

The proposal needs the blessing of the 28 European Union governments before it can become law. Google, Facebook and other internet companies have lobbied against such plans, worried about the extra costs.

The issues of privacy and data protection in Europe have become all the more sensitive since a former U.S. intelligence contractor, Edward Snowden, leaked details last year of U.S. surveillance programs for monitoring vast quantities of emails and phone records worldwide.

Extra costs

Tuesday's court ruling will likely benefit ordinary people but not public figures, said Larry Cohen, a partner at law firm Latham & Watkins.

"The ruling will help certain people hide their past, making it difficult to access certain information, but not when it concerns public figures, or people in whom there is a genuine public interest," he said.

"This will result in added costs for internet search providers who will have to add to their take-down policies the means for removing links to an individual's data, and develop criteria for distinguishing public figures from private individuals," he said.

The Spanish data protection agency said the case was one of 220 similar ones in Spain whose complainants want Google to delete their personal information from the web.

"We are very satisfied that there is an end now to the ferocious resistance shown by the search engine to comply with the resolutions of the Spanish data protection agency in this matter," a spokeswoman for the agency said.

European Justice Commissioner Viviane Reding said that the court ruling vindicated EU efforts to toughen up privacy rules.

"Companies can no longer hide behind their servers being based in California or anywhere else in the world," she said on her Facebook page, calling the judgment a "strong tailwind" for data protection reform.

Google suffered a previous privacy setback earlier this year when a German court ordered it to block search results in Germany linked to photos of a sex party involving former Formula One motor racing boss Max Mosley.