LAST week, a High Court judge spent over an hour, in court, with barristers, solicitors, media and the public present, justifying the reasons why two girls sentenced to life for a brutal murder should be protected by the blanket of anonymity.

The case of the schoolgirl killers accused of beating Angela Wrightson to death in Hartlepool, who even took a “selfie” in-between beatings, incensed the nation.

The judge’s reasons to protect their identities were compelling, if unpopular. The girls’ welfare was at risk, as they were vulnerable, suicidal, with limited intelligence – and still only 15, despite their brutal crime.

The judge, Mr Justice Globe, had earlier ordered a retrial after their pictures were shared, and vitriolic comments made on social media, during the first trial at Teesside Crown Court. He imposed strict conditions on the professional media about posting on their Facebook or Twitter feeds until the trial's end to try to prevent any inflammatory – or prejudicial – material appearing.

Once the second trial, at Leeds Crown Court, was over, some of the national media applied to have the order protecting their identity lifted, but the judge gave lengthy reasons why he believed it should remain in place. The next day, incensed by the decision, the general public posted the girls’ pictures and names on the internet – “please share” – the posts pleaded. One single post had been shared over 10,000 times, and there are many, many more.

The media strictly observed the anonymity order, on pain of their editors being imprisoned for contempt of court, but their diligence proved fruitless.

This week a celebrity has obtained a so called “super injunction” to protect his privacy after details of a threesome he was involved in was poised to be published in a national tabloid. He cannot be named in any media in England and Wales, but a Scottish newspaper – exempt from the injunction – ran the story on the front page. US newspapers have also carried it, and a search of Twitter throws up more.

The legal system needs to catch up – and fast. While Facebook is known to work with police forces where it can, the information it carries is just too vast to regulate.

The UK has the most regulated press in the free world. Professional journalists have to receive rigorous training in media law and tiptoe carefully around free speech to publish what we can in the face of strict libel, privacy and contempt of court laws.

But the advent of social media is flying in the face of all that. Everyone has suddenly become a citizen journalist.

The “facts” they publish are unchecked, sometimes illegal, and often wrong. While the professional media continue to abide to their strict rules – and I know, we don’t always get everything right – 99 times out of 100 what you read has been checked, double-checked, and is worded carefully.

Court orders and injunctions, while often made for valid reasons, are proving fruitless. What is the point in banning the mainstream media from publishing things that will be posted all over social media instantly, and potentially seen by more people? Anonymity orders just make people even more inquisitive and determined, and penalise the professional media while ignoring the much more damaging unregulated media.

There need to be more prosecutions of people flouting the rules, but the judiciary also needs to take a serious look at how court orders are worded, imposed and carried out, to avoid expensive and futile justice.