Thousands of desperate Zimbabweans are scrambling to South Africa's registration offices with only a day left to legalise their stay in the country - or face deportation in the New Year.
South African authorities declared in September that they were cracking down on illegal migrants and said any Zimbabweans who had not applied for the necessary papers to live and work here by 31 December would be forced to go home.
But as feared by authorities, many left applying for work or study permits until the last minute.
Long queues this week snaked for two blocks outside a Department of Home Affairs building in central Johannesburg - one of the many offices overwhelmed by large crowds of Zimbabweans.
Many people had spent the night on the pavement, in an attempt to be one of the first to be served when the office opened its doors at 0800.
Thousands of people, including the elderly and women with babies on their backs, braved the scorching heat as the queues inched closer and closer to the entrance.
Thenjiwe Dube, 30, one of the few to emerge from the office, was delighted to finally have a legal status in South Africa.
"Back home, because of the poverty young women are forced to marry young just so they have someone to take care of them. I didn't want that for myself, that is why I left," she beamed.
"Now that I have my papers, I have freedom."
Ms Dube goes door-to-door selling clothing to earn money to send to her family in Zimbabwe.
Because Ms Dube is self-employed, she had to get an affidavit from the police proving that she has an income.
All immigrants who are not in formal employment are required to produce this document when applying for a permit.
She is the oldest of five siblings and says although life has improved in back home, she is not ready to return.
Prisca Ncube, a 51-year-old domestic worker, who had been waiting in the queue for more than four hours, has a similar story.
"I have nothing in Zimbabwe, I don't even have a house but with the little that I'm getting in South Africa I can afford to take my children to school," she said.
One of her three children lives with her in Johannesburg, while the other two are being cared for by relatives at home.
Some two million Zimbabweans are estimated to have fled to South Africa following the collapse of their country's economy and the political crisis of recent years.
For many, South Africa offered the promise of a better life.
Many of them have obtained fraudulent South African documents, such as passports, birth certificates and identity cards in order to stay in the country.
But they have been offered an amnesty against being prosecuted or deported if they hand in the documents to authorities during this period.
To date less than 140,000 have received permits across the country.
This is seen as a disappointing figure given the large numbers of Zimbabweans in South Africa, many of them illegally.
Some migrants are believed to have been put off applying because they cannot afford to take the necessary time off work to join the queues.
As a result many rights groups sent a joint letter to the Home Affairs department to call for an extension to Friday's deadline.
Zimbabwean Mandla Ngwenya, employed as a gardener in Johannesburg, backs the call.
"There are thousands of people who are having problems with getting the necessary papers from Zimbabwe," he said.
Getting the permits relies on having proper identification, in the form of a Zimbabwean passport - something many illegal migrants do not have.
"I went to apply for a passport in Zimbabwe last month but I'm still waiting for it," said Mr Ngwenya.
"If I don't get a permit, I'll have no other choice but to go back home because we've been told that we will be arrested," he said.
"We need more time."
For Mr Ngwenya, life in Zimbabwe cannot offer him the future he wants for his family - who he has left in Bulawayo.
"I am not educated so my wish is to make sure that my children are educated and don't end up like me. I can't go back to Zimbabwe. I need to earn a living for them and take them to school," he said.
No end in sight
But South Africa's Home Affairs Department announced this week that there would be no extension.
"Let there be no illusion, the government will not extend the deadline for the registration of illegal Zimbabweans living in South Africa," said South Africa's Minister of Home Affairs Nkosazana Dlamini-Zuma.
"Every resource has been placed at the disposal of illegal Zimbabweans living in South Africa to afford them the opportunity to regularise themselves," she said.
Work hours have been extended and more staff have been brought in to assist with the applications in Home Affairs offices across South Africa.
Many more are likely to be filed in the next day.
Ms Dlamini-Zuma has insisted that deportations are not expected to start until all the applications have been processed but it is not clear how long that process will take.
But of course there will be no long-term solution to the problem until the situation improves north of the Limpopo.