Saudi Arabia has given illegal foreign workers a three-month grace period to legalise their status, after panic over reported mass deportations, an official statement said.
King Abdullah ordered the interior and labour ministries to allow "workers violating the labour and residency system a maximum of three months to rectify their situation," said the statement carried by SPA state news agency.
The Saudi authorities this year imposed new labour constraints affecting millions of expatriates in the Gulf state, in a move that sparked fears of mass deportations among the immigrant workers.
The new regulations introduced by the labour ministry aim to reduce the number of foreign workers to create jobs for millions of unemployed Saudis.
Yemenis and South Asians -- Indians, Pakistanis and Bangladeshis -- who work in low-paid jobs across the kingdom will be mostly affected by the decision, according to observers.
Some 200,000 people have been expelled from the oil-rich kingdom in the past three months based on the new restrictions, immigration officials say, while Yemeni officials speak of thousands of their nationals sent home.
Saudi Arabia hosts eight million foreign workers, mostly in very low-paid jobs, according to official figures, while economists say there are another two million unregistered non-Saudi workers in the kingdom.
Under the new rules, foreigners are allowed to work only for their legal sponsors in the kingdom while their spouses cannot take up jobs.
Many foreigners enter Saudi Arabia under the sponsorship of a Saudi national but end up working for others, or set up their own businesses.
The kingdom has two million unemployed Saudis, many of them fresh graduates, and women, according to Labour Minister Adel Fakih.
"Foreign workers working without labour visas are competing with Saudis for jobs since they accept lower wages," said Saudi economist Ihsan Abu Haliqa.
"The current campaign (to expel workers) will no doubt strongly affect retail and services sectors," he said, pointing to the fact that nearly 1.2 million work visas were granted to foreigners in 2011 and two million in 2012.
The labour ministry imposed new quotas in 2011 on companies regarding the hiring of local staff, which determines their ability to recruit foreigners.
The labour ministry's inspections have forced tens of thousands of workers to leave their workplaces and hide at home, including many private school teachers whose absence has disrupted school classes.
The director of a private school in the Red Sea city of Jeddah told AFP that "classes have come to a complete halt. There are no teachers and we have asked students to stay at home until further notice."
"A state of panic has spread among teachers after rumors that labour ministry inspectors have torn out residencies and immediately deported many" foreign employees, he said.
At least 40,000 students attend private schools in Jeddah.
Labour ministry spokesman Hattab al-Anzi said that "our role is restricted to carrying out inspections inside workplaces and investigating irregularities before referring them to the interior ministry which implements punishments accordingly."