Social-networking sites such as Facebook, or search engines such as Google, may face court action if they fail to obey planned EU data privacy rules, European Union justice chief Viviane Reding said on Wednesday.

Reding will propose an overhaul of the EU's 16-year-old laws on data protection in the coming months to enforce more safeguards on how personal information is used.

Much of the revamp would target sites such as Facebook, Google, Microsoft or Yahoo, because of rising worries about how they use information they collect about users' personal habits.

Reding wants to force companies to allow Internet users to withdraw any data held by the websites, calling it the right to be forgotten, as well as make the firms provide more information on what data is collected and for what purpose.

With many of the companies based in the United States or holding data on servers there, she said agencies watching over privacy issues in EU countries should be given more powers to enforce compliance outside Europe.

Any company operating in the EU market or any online product that is targeted at EU consumers must comply with EU rules, Reding, who oversees justice and human rights in the executive European Commission, said in a speech.

To enforce EU law, national privacy watchdogs shall be endowed with powers to investigate and engage in legal proceedings against non-EU data controllers, she said.

Privacy concerns have led to tensions with Washington last year after the European Parliament vetoed a deal struck with the European Commission on sharing bank transfer data with counter-terrorism investigators from the United States.

The agreement had to be renegotiated to increase privacy protection before it took effect.

Any new EU rules on privacy are still some way away. Reding's proposals, expected before July, would have to be approved by EU governments and by the European Parliament.

(Reporting by Justyna Pawlak; Editing by Rex Merrifield)