Teacher Michael White, pictured left, was jailed earlier this month after pleading guilty to inciting a girl under 13 to engage in sexual activity.
But the judge in the case, Anthony Goldstaub QC, imposed an order preventing the Colchester Daily Gazette from publishing his name and details of the school where he worked.
The Gazette immediately challenged the order, which was understood to have been made under “contempt of court” laws by the judge.
Within hours of receiving a letter from Simon Westrop, lawyer for the newspaper’s publisher Newsquest, the order was revoked.
The Gazette has now published the full details of White’s sentencing, which took place on 1 February at Chelmsford Crown Court.
Gazette Editor James Wills said: “Despite requesting the opportunity to challenge the order before the judge at sentencing, this took place without prior notification.
“We were of the opinion such a ruling was without legal justification and, with the help of Newsquest lawyer Simon Westrop, immediately wrote to the judge challenging it. The reporting restrictions were immediately lifted.
“The placing of such questionable orders seems to be increasingly common throughout the country, and newspapers must always do their utmost to challenge them.
“Only by doing so will we ensure the important principles of open justice and court reporting are maintained.”
Glenda Thompson, prosecuting, told the court in March 2014 White, 26, spent ten hours sending messages to the girl about what he wanted to do with her before sending a naked pictured of himself to her.
The girl’s mother checked her tablet and discovered what White had been doing.
Cyrus Schrof, mitigating, said: “He’s struggling to explain his behaviour, it was totally out of character – it came out without any warning whatsoever.
“He struggles to understand how he became engaged in such conversations. He’s ruined his life – it was utter stupidity and foolishness.”
White was jailed for three years and four months. He was also given a sexual harm prevention order for ten years banning him from specific contact with children and placed on the sex offenders register indefinitely.