Yesterday it was reported that Paul Thompson was sent to prison for two months, just for taking a photograph in court with his Blackberry.

It was a classic "Bad Law" news story, the sort of piece which will make the reader think that the "law is an ass". Such stories are a journalistic staple; they are easy to write, and the result is invariably outrage at the disproportion of the sanction or the lack of common sense.

Often these stories are true, for the law can indeed be an ass. All those concerned with the application of legal powers and judicial remedies -- from police officers to distinguished judges -- make mistakes or act without proper deliberation and, given the coercive force of law, people's lives can be adversely affected. Similarly those who devise or make laws, such as civil servants and politicians, can end up legislating on a misconceived basis. The law can be brought into disrepute in many ways and by many people, most of whom should know better.

But sometimes the news stories are incorrect. To paraphrase Ben Goldacre, author of the Bad Science columns at the Guardian, it turns out that things are more complicated than is apparent from news reports. Any news story which prompts the reaction that the "law is an ass" is normally one of two kinds: either the law is actually at fault, or the legal reporting is incomplete or misleading. In other words, a "Bad Law" news story means either bad law, or bad law journalism.

And so we turn to the story of Paul Thompson and his Blackberry. The Times reported (£) that 19-year-old Thompson "was sitting in the public gallery of Luton crown court to watch a friend being sentenced for robbing an off-duty police officer when he took a snap of the courtroom on his Blackberry". This photograph was "in response to a message from a girl asking where he was".

Thompson was spotted, taken to the cells, and then on his return to court was sentenced to two months imprisonment. The Times referred to section 41 of the Criminal Justice Act 1925, which prohibits photography in Court. There was also mention that the sanction is up to two years in prison or a fine. A well-known media lawyer was then quoted as saying that the penalty seemed "robust for someone who had committed an inadvertent breach of the law". There was even mention of Thompson's "eight week-old puppy", which had been left "alone in his flat in Luton". The story was reported in similar terms by the BBC, and even the Guardian took the story at face value.

It was seemingly stark that this was a ridiculous over-reaction by the judge. It surely could not be right that a teenager should be imprisoned in such a casual fashion, for such a long period (and which left a puppy to starve).

So what really happened?

What did occur was more complicated than the account set out in the Times and elsewhere. In fact, Thompson had been continually disruptive in Court and had been asked twice by the usher to stop disrupting proceedings. As a spokesperson for the Judicial Office of Communication stated:

Mr Thompson had been disruptive throughout the sentencing hearing. He was warned twice by the court usher to keep quiet in court before being finally asked to leave the court. He had also taken a photograph in court of the victim in the case who had suffered a violent robbery. Her Honour Judge Mensah dealt with the matter under the Contempt of Court Act 1981 and not s.41 of the Criminal Justice Act 1925 as some media have reported. She considered the totality of Mr Thompson's behaviour in court. In sentencing him she took into account his immediate admission of guilt and made clear the sentence included an element of punishment and deterrent to others.

So, contrary to the news reports, Thompson was not punished just for taking a photograph, and nor was he convicted under the offence specified by the Times (which, in any case carries, only a small fine). He instead was sentenced in respect of the disruption as a whole. The photograph was not just a quick picture of the court to show a friend where he was; it was instead a photograph of the victim of a violent assault. And it was not a casual sanction; there had been warnings, and legal representation was arranged. The photograph taken was examined by the police and the judge before the sentence was handed down. Almost all this information was available to those reporting the story, had they asked for it.

The robbery involved appears to have been horrifying. According to the judge:

[The victim] was ambushed by somebody putting a gun to his head. He was pulled to the ground and his eyes were covered and he was violently robbed. The gun may have been imitation but that is of little comfort to the victim who had it poked to his head and I have heard evidence that you laughed after the robbery and childishly adopted gangster-like poses for photographs. You thought it was funny to rob someone at gun-point, putting them in immense fear. Both of you are dangerous young men who glory in following dishonest and violent life styles.

One can perhaps see why a camera then being pointed at the victim by Thompson did not go down terribly well with the judge.

All this said, the question remains whether the two-month imprisonment for Thompson was excessive. The Court of Appeal in 2004 (referred to here) held that a twelve month sentence for contempt of court was appropriate when the appellant took three photographs -- of people in the Court canteen, a witness giving evidence, and a defendant and prison officer in the dock. The Court of Appeal said that taking photographs in the courtroom was a growing problem and needed to be taken seriously, especially when the pictures are of those who could face intimidation or reprisals. Accordingly, it was clear "that illegal photography had the potential gravely to prejudice the administration of criminal justice". In appropriate cases, immediate imprisonment was appropriate; in that appeal case, this would be for 12 months, but for others "the clang of the prison gates would be enough". However, in the case of a tourist just snapping a pic in ignorance of the law, a fine would be appropriate.

Nonetheless, two months imprisonment is a long time for any 19-year-old. It may be that there is an appeal. What is certain is that the initial news reports of what happened last week in Luton Crown Court did not really tell the fuller story. Someone was continually disrupting the sentencing in respect of a serious violent offence, and he then took a photograph of the victim. On these facts, it would appear that there was indeed a contempt of court. Thompson was then provided with legal representation before being sentenced. An appeal court may consider whether two months is excessive; which it could well be. But this does not seem a case where it was the law which was an ass.

And, fortunately, the puppy did not starve.

David Allen Green is legal correspondent of the New Statesman