(CNN) -- People have the "right to be forgotten" and search engines like Google must remove certain unwanted links, Europe's top court decided in a surprise ruling Tuesday.
The case, which spotlighted the clash between privacy and freedom of information advocates, centered on a Spanish man's efforts to remove historic links to his debt problems.
In its decision, the European Court of Justice found operators of search engines such as Google were the "controller" of information. They were therefore responsible for removing unwanted links if requested.
"An Internet search engine operator is responsible for the processing that it carries out of personal data which appear on web pages published by third parties," the judges said in a statement about the ruling.
A Google spokesman, in an email to CNN, said the ruling was "disappointing," and that the company needed time to "analyze the implications." Google had previously argued it was only hosting the data and said it was up to the individual websites to remove the data.
The decision came as a surprise to the industry and legal experts, as it ran contrary to the court's Advocate General opinion, whose guidance is usually followed.
"For Google, this result creates a headache -- and potentially huge costs," University of East Anglia Law School lecturer Paul Bernal said. "The ruling looks like a strong decision in favor of privacy and individual rights -- and against the business models of search engines, and certain aspects of freedom of speech."
The case arose in 2010, when Mario Costeja Gonzalez complained to the Spanish Data Protection Agency about an old newspaper notice detailing his social security debts.
The advertisement was placed in a Spanish newspaper by the Ministry of Labour in 1998. It detailed a property auction being held to recover the debts.
Gonzalez argued that he had long resolved his debts and the information was no longer relevant. He complained that details about his old debts were coming up in Google search results, which he said violated his data protection rights.
The Spanish privacy watchdog rejected the complaint against the newspaper, saying it was right to publish the information at the time of the auction.
However, it also said that Google had no right to spread the news about Gonzalez further and ruled that the search engine must remove the link from the list of results. Google challenged the ruling with the Spanish High Court which referred the case up to EU's top court.
International watchdog Index on Censorship said the ruling "violates the fundamental principles of freedom of expression."
"It allows individuals to complain to search engines about information they do not like with no legal oversight. This is akin to marching into a library and forcing it to pulp books." Index said in a statement.
™ & © 2014 Cable News Network, Inc., a Time Warner Company. All rights reserved.