The children who were removed from three children's homes in Ladysmith and Newcastle at the weekend by the Department of Social Development have to be returned within 36 hours.
This follows an urgent application brought in the Pietermaritzburg high court on Wednesday by the operator of the homes, the KZN Christian Social Services.
Judge Rishi Seegobin granted an order "due to the urgency of the matter" and the "failure" by the department's in-house attorney to produce documents that followed the removal of 146 children, from babies to 18-year-olds.
The judge ordered that the department must initiate investigations into allegations of abuse and other complaints indicative of it not being in the best interests of the children to be kept at the homes.
They are the Ladysmith and Newcastle Mrester Child and Youth Care Centres and the Home Meah Child and Youth Care Centre in Newcastle.
The department has been ordered to report back to the court regarding the investigations and recommendations.
The investigative process is to be conducted in a manner that minimises any trauma to the children concerned.
When the case was called, the department's attorney Nkazimulo Mdluli sought an adjournment, which was opposed by advocate Sonja Franke who represented the children's homes.
Judge Seegobin viewed the case as urgent, saying the court is the "upper guardian of all minor children".
Since Mdluli was unable to answer any questions regarding the removal of the children, the department's legal head, Ntuthukuko Hlabisa, took the stand and testified. He said the children were removed following allegations of physical and emotional abuse. He also alleged that black African children were being treated differently.
The complaints were from children and staff. He also said that there is a video of "a white male shouting at staff who were preparing meals".
"He was using the K word, instructing them what to do," said Hlabisa.
He added that on February 14 and 15 all the children - about 200 - were interviewed by social workers and reports on each were compiled. Notices were then issued to the homes in respect of the removal of each child.
The judge asked to see proof of this and adjourned the matter.
When the case resumed, it did not sit well with Judge Seegobin that the proof was not forthcoming. Mdluli said the department's server was down because of load shedding and the proof could not be retrieved from the server.
Judge Seegobin refused a request for the matter to be rolled over until today.
He said he was going to rule that the children be returned and ordered the parties to come to an agreement regarding the details of the order, including how to deal with the allegations made against the homes.