Attorney general Dominic Grieve has warned that users of micro-blogging site Twitter and other social networking sites would face legal action if they breach privacy injunctions.

Grieve said that users could be prosecuted under the law for breach of injunctions and added that he would take action if it is found that the law was being violated.

Grieve said, "I will take action if I think that my intervention is necessary in the public interest, to maintain the rule of law, proportionate and will achieve an end of upholding the rule of law. It is not something, however, I particularly want to do."

He also said newspapers also could be prosecuted for contempt of court if they dropped heavy hints about the identity of a person protected by an injunction.

Contempt of court carries penalties including a fine, seizure of assets or even imprisonment.

Meanwhile, lawyers of Manchester United footballer Ryan Giggs are demanding Twitter to release details of users who named the Giggs on the site, breaching an injunction.

On 8 May, an unknown user had revealed that Giggs had an affair with former reality television star Imogen Thomas. Around 75,000 Twitter users and a Scottish newspaper also named Giggs in the affair, despite an injunction in which two judges had insisted that Giggs should remain anonymous.

Now, the lawyers have started new court proceedings to force Twitter to disclose personal details of those breached the injunction.

Earlier, a high court judge issued an injunction that for the first time placed a ban on publishing information on any social network or media including Twitter or Facebook.

The order, made by Justice Baker in the court of protection, extends to other media as well.

The order came after tweets started appearing on Twitter that were about identities of celebrities involved in "superinjunctions". The information had wrongly named Jemima Khan as one of them.