The lifting of a court order preventing journalists from identifying Terail McDonald concludes a lengthy fight by this paper to get his name into print.

When McDonald was charged last year, police refused to disclose his identity even on a not-for-publication basis. Their obstruction nearly stopped us covering the case at all because, without his name, we had no way of finding it in the court system. It was particularly galling because anonymity can only be ordered by a court, on the direction of a judge: the police have no place deciding which defendants' details should and should not be in the public domain. Fortunately the Crown Prosecution Service was happy to fill us in.

We followed the case through to the trial date at Blackfriars. After wrongly telling us we were not allowed to sit in court as an anonymity order was in place (such orders restrict publication, not journalists' presence), the clerk - along with the judge and various defence and prosecution lawyers - was unable to find evidence that an order of any description had actually been made at all, so the judge hastily imposed a "section 45", restricting identification of an under-18 involved in court proceedings. She indicated she'd reassess if there was a conviction.

There was, so at McDonald's sentencing last week we applied for the order to be lifted. We cited case law around the defendant's age of 17 (juvenile anonymity orders expire at 18 so there were barely months in it) along with the publicly notorious nature of the crime, the deterrent impact of naming a defendant publicly, and the fact anonymity orders can't be doled out without considering the value of open justice. The judge agreed and we won the right to publish McDonald's name.

It's one case in a thousand, but we're proud of striking a very small blow for this seemingly unfashionable and poorly understood cause. There are valid reasons for concealing the legal process from the public, but neither the courts nor any other public bodies can be trusted to make these decisions unilaterally. That's where the press comes in.