Nearly a million Bangladeshis, Filipinos, Indians, Nepalis, Pakistanis and Yemenis, among others, have taken advantage of the three-month amnesty -- announced on April 3 and then extended for four months -- and left the country.
Another roughly four million have legalised their situation by finding employers to sponsor them, a must to reside in most Gulf monarchies.
But the clock is ticking, and the Saudi labour ministry has said there will be no second chance, despite appeals from some Asian governments.
"We have absolutely no intention of prolonging the amnesty," said ministry spokesman Hattab al-Anzi.
Pakistan said this week that it has been pressing for an extension of the amnesty until the end of January.
Even so, its foreign ministry spokesman Aizaz Ahmad Chaudhry said: "We are trying our best to legalise as many Pakistanis as we can before the deadline ends."
In contrast, Indian foreign ministry spokesman Syed Akbaruddin told AFP "we have not asked for extra time," explaining Indians had been urged to "abide by the rules, and we have had quite remarkable success".
So foreigners are queuing outside governmental offices either to sort out the paperwork for leaving the kingdom or legalising their stays.
The Arab News daily said some Indians seeking repatriation had waited more than 31 hours outside the deportation centre in the Red Sea city of Jeddah to get the documents to leave.
The immigration department said on Thursday that "more than 900,000 people have left the country with final exit visas".
Saudi Arabia, the world's largest oil exporter, is a goldmine for millions of people from Asia and elsewhere in the Arab world, who find work as common labourers, drivers, porters and house maids.
Expatriates account for around nine million of the country's 27 million population.
Saudi Arabia has the Arab world's largest economy, but the unemployment rate among natives is above 12.5 percent, a figure the government is aiming to reduce.
Economist Abu Dahesh said illegal workers who were still needed by their employers had had their papers legalised, while the rest were rejected.
"They represented an oversupply," he said.
Signup to our newsletter and follow us on Facebook and Twitter!
'Employers abuse sponsorship system'
Economist Ihsan Bu-Hulaiga echoed that, saying "this labour force is marginal in terms of skills and qualifications; the Saudi economy will not be affected by their departure".
But the exodus could create a shortage of day labourers, particularly in construction and portering.
Speaking at one of the many public squares in Riyadh where men used to gather and wait to be chosen, Pakistani Hafezudin Shah said "hundreds of men used to be available at this spot".
"Now, there are no more than 20."
Shah is among the lucky ones who found a new sponsor in a process that cost him 10,000 riyals (about $2,700/2,000 euros).
But Ethiopian Suleiman Ahmed's dreams were shattered.
"I paid 20,000 riyals for a sponsor, and he disappeared. That ruined me, and I will have to leave," he said.
Human Rights Watch has denounced the system as abusive.
"The kafala, or sponsorship, system ties migrant workers' residency permits to sponsoring employers, whose written consent is required for workers to change employers or leave the country," it has said.
"Employers often abuse this power in violation of Saudi law to confiscate passports, withhold wages and force migrants to work against their will or on exploitative terms."
In July, HRW's Joe Stork said: "Saudi Arabia should get serious about regularising the status of its workers and do away with an abusive labour system that forces migrants into illegal employment.
"Migrant workers trapped in miserable job conditions or fleeing abusive situations should be able to change jobs without employer permission or government delay."
But for now, once the amnesty expires, teams of inspectors and police will start fanning out looking for illegals.
Those who are caught face jail terms and fines of 100,000 riyals, as well as being blacklisted.
Then, the dreams of working in a place where they can perhaps earn as much in a month as in a year at home could end forever.