The ruling has major consequences for social workers and has provoked a debate over whether the rights of a parent should come ahead of the welfare of a child in decisions about care.
One of the workers, Carol McCulloch, decided to cease contact due to concern the two children were suffering. Her line manager, Gillian Lawrence, approved the decision. Both were held individually responsible and face court costs thought likely to run into five figures. However, the ruling was strongly criticised by unions and social work leaders, amid warnings it might undermine child protection work.
Sheriff Katherine Mackie initiated proceedings for contempt against the two children and families social workers after her own ruling from May 24 this year was disregarded. She had ruled in favour of a mother - who cannot be named for legal reasons - at appeal, after a children's hearing had reduced her contact with her children, who were in care.
However, Ms McCulloch ceased the weekly contact from July 15 until August 22. In a judgment issued yesterday, Sheriff Mackie concluded she had done so without getting legal advice.
Sheriff Mackie found both workers in contempt of court, saying "They have shown disrespect for, and disregard for, the decision of this court and interfered with the administration of justice".
But she said there would be no punishment, adding: "A finding of contempt of court will be of considerable importance for persons in the positions of CM and GL," identifying the workers by their initials.
The judgment will lead to an automatic investigation by the Scottish Social Services Council (SSSC), which registers all care workers and a criminal conviction could result in a worker losing their right to practice.
A spokeswoman for the SSSC said: "As with any matter that comes to our attention, we will consider whether there is an issue about a social service worker's suitability to remain on the SSSC Register."
Edinburgh City Council, which employs the two social workers, was not allowed to participate in the proceedings. Paul Godzik, children and families convener, said the case had implications for public services across the country. He said: "The child protection managers and their representatives will examine the full judgment before deciding whether to lodge an appeal."
Unison called for the Scottish Government to review the law. Dave Watson, the union's organiser for Scotland, said:"Today's decision highlights the need for a legislative review and one that ministers need to address as a matter of urgency."
Families Need Fathers Scotland, commenting on the judgment, said: "We welcome the sheriff's stern reminder to these social workers that they should have upheld the court's decision on contact. Professionals must be transparent in their actions and accountable for them."
Sandy Riddell, president of the Association of Directors of Social Work, said: "The tendency towards much more robust legal representation has promoted and protected the rights of adults, but has diluted the child-centred approach of our Children's Hearing system."