Refugees occupying the area around the UN High Commissioner for Refugees' (UNHCR) offices in Pretoria have been given three days to vacate it.
The Sheriff of the High Court arrived on Thursday afternoon and read out the order before pinning it to the gates.
However, the refugees - who have been living on the pavements, in tents and makeshift structures outside the offices since the beginning of October - are no longer there.
Hundreds are asking to be resettled in another country as they fear xenophobic attacks in South Africa.
Their presence led to an urgent application by the Waterkloof Homeowners' Association and Brooklyn and Eastern Areas Citizens' Association to have them removed, which was granted.
On Thursday morning, refugees moved onto the premises, jumping over gates and walls with their belongings.
According to the order by the Gauteng High Court in Pretoria, they have been given three days to vacate and disperse.
In the event that they do not leave, a joint operation between the police, home affairs officials and Tshwane Metro will move in to ascertain the refugees' status and remove them.
The refugees preempted the removal and moved on to UNHCR property, arguing they were no longer on the pavements so the court order was no longer applicable.
News24 previously reported the police were called in after the refugees scaled the walls of the UNHCR's offices and started setting up camp inside the premises.
Police sources confirmed to News24 that a case of trespassing had been opened and they would go onto the premises to remove the group.
By Thursday afternoon, police management had been engaging with refugees to find an amicable solution that would see them leaving the property peacefully.