A senior judge has concluded that a woman accused of not complying with an order made in a family court was wrongly given a three-month suspended prison sentence.
Mr Justice Baker has quashed the sentence, imposed in February by a family court judge at a hearing in Mansfield, Nottinghamshire, after the woman appealed.
He said the imposition of the sentence was wrong because of a number of "serious procedural irregularities".
Detail of the case emerged in ruling published by Mr Justice Baker, based in the Family Division of the High Court in London, following an appeal hearing.
Mr Justice Baker said there had been no application to commit the woman to jail.
He also said the woman had not been given "proper notice" of the hearing and because of that a barrister who represented her had been unable to attend.
The case centred on the woman's four-year-old daughter.
Mr Justice Baker said the girl's father had died, and the woman had been ordered, in July 2017, to let her late partner's mother spend time with the girl.
There had been complaints that the woman had not done what she was told.
Mr Justice Baker said the suspended prison term had been imposed in a bid to make the woman comply with the order.
"In this case, it is plain that there were a number of serious procedural irregularities," said Mr Justice Baker in his ruling.
"I reached the clear conclusion that the (sentence) was wrong.
"I am not endorsing the appellant's actions. It seems plain that she has failed to comply with the order of 21 July 2017. But the fact that a party has failed to comply with an order does not empower the court to make a committal order without complying with the procedural requirements."
Mr Justice Baker said the woman could not be identified.
Judicial heads have twice in recent years laid down rules relating to procedures judges must follow when considering applications to commit people to jail for contempt, in a bid to ensure no-one is jailed in secret. In March 2015 Lord Thomas, the Lord Chief Justice and the most senior judge in England and Wales, said the general rule was that committal hearings were staged in public, orders were made in public, judgments were given in public and people were named.
Copyright (c) Press Association Ltd. 2018, All Rights Reserved. Picture (c) PA Wire.