Twitter users that break superinjunctions when posting on the microblogging site could be prosecuted, says Attorney General Dominic Grieve

The government's legal advisor told BBC Radio 4's Law in Action programme that while enforcing a privacy injunction was usually handled by the individual behind the order, he will get involved himself if he believes it's necessary.

"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," he said.

"It is not something, however, I particularly want to do."

Those prosecuted could face a fine or even imprisonment.

Grieve's comments comes after thousands of Twitter users ignored a privacy injunction and named Ryan Giggs as the Premiership footballer alleged to have had an affair to Big Brother star Imogen Thomas. Giggs has since threatened to take legal action against web users, including former Britain's Got Talent judge Piers Morgan and DJ Boy Geroge, that identified him as the footballer behind the superinjunction.

However, Liberal Democrat John Hemming used parliamentary privilege to identify Giggs in parliament.

Quentin Bargate, Senior Partner of  legal firm Bargate Murray said the Attorney General's comments are laudable but they are unlikely to make a significant difference.

"There are simply too many members of a diverse range of social media sites, many based overseas, to make enforcement against more than a token few individuals practical," he said.

"Perhaps we should stop trying to kill the messenger and instead look at whether the message is the problem. In other words, how much of the information in question really needs to be kept confidential?"