A government crackdown on illegal foreign workers in Saudi Arabia has disrupted the lives of tens of thousands of people and made it harder for some businesses to operate. But ultimately it may create a stronger, more diverse economy.

Thousands of foreigners - over 200,000, according to an unnamed passports department official quoted by the al-Hayat daily last week - have been deported from the country over the past few months.

People stopped going to work at some businesses in major cities such as Riyadh for fear of being caught by government inspectors. Parents at some private schools said there were unscheduled holidays because teachers were staying home.

The turmoil was so great that last Saturday, King Abdullah ordered a three-month suspension of the crackdown, to give foreigners time to sort out their papers. Many people remain fearful of trouble with authorities when inspections resume.

Some businessmen in Saudi Arabia complain privately that the government should have launched its campaign more carefully, coordinating closely with companies to reduce their uncertainty over staffing levels.

The crackdown is likely to have an economic impact far beyond the country's borders, since foreign workers from south and southeast Asia remit billions of dollars home to their families every year.

But within Saudi Arabia, the economic costs are likely to be outweighed in the long run by the benefits of reducing excess manpower, creating upward pressure on local wages and moving Saudi citizens into private sector employment, analysts said.

"Most of the illegal labour is unskilled labour, extra labour that in fact creates inefficiency in the economy. So these people are more than the economy needs," said Abdulwahab abu-Dahesh, a Saudi economist.

"Proper policies to reduce inefficiencies will create more competitiveness in the economy."

Since its 1970s oil boom, Saudi Arabia has imported growing numbers of foreign workers for its energy, construction and service industries. In many cases, Saudi citizens have not been willing to perform the strenuous jobs or accept such low wages.

There were almost 6 million foreigners in a total workforce of nearly 11 million people in 2012, according to official data. The number of illegal foreign workers has been estimated by analysts at an additional 1 or 2 million, conceivably more.

The remittances sent abroad by these foreigners have averaged $18 billion a year over the past decade, or 6.2 percent of gross domestic product, making the kingdom the world's second biggest source of such money flows after the United States, the International Monetary Fund said in a September study.

While Saudi Arabia can easily afford that cost now, it may have difficulty in the future if oil prices drop sharply.

So in the last couple of years it has mounted a drive to reduce companies' reliance on foreigners. Firms receive quotas for their expatriate workers, and are penalised financially for exceeding them; the government subsidises job search and training programmes for local citizens.

The deportations in the last few months represent the latest and one of the most effective steps in the drive, analysts said.

"You will obviously see fewer expatriates in Saudi Arabia. It will not be dramatically lower, but it will progressively get smaller and smaller," said John Sfakianakis, chief investment strategist at MASIC, a Riyadh-based investment company.

"The private sector will continue favouring foreigners but it will decline over the years."

Even before the deportations, Saudi companies were starting to feel the monetary impact of the government's labour policies.

When major Saudi construction firm Abdullah A. M. Al-Khodari Sons reported a 50 percent plunge in net profit from a year earlier for the final quarter of 2012, it blamed the result partly on difficulties it faced in hiring foreigners.

The company, which has a market capitalisation of $385 million, said it was no longer being granted as many Saudi visas to hire foreign workers, causing project delays and cost over-runs. Finding enough Saudis to fill jobs was a struggle.

"Despite efforts for recently hired nationals to join the workforce as part of their training, high labour turnover - over 40 percent - as well as the modest interest shown in participating in construction projects have led to a high direct impact in terms of manpower costs," it said.

Wages for Saudi construction workers are almost five times higher than those for expatriates, an IMF study found.

The impact of foreign labour quotas "on individual companies is clearly negative. Staff costs are rising sharply, as Saudis get paid more and need more training," said Farouk Soussa, Citigroup's chief economist for the region.

So far, however, the crackdown on foreign workers does not appear to have done major damage to the economy as a whole; surveys of private sector business activity this year have shown continued growth, and the stock market hit an 11-month high on Wednesday.

And the economy may ultimately benefit in several ways. Analysts agree that in some areas, such as the retail sector, Saudi Arabia is overstaffed, so job cuts may be positive.

"Instead of having 10 corner shops in one neighbourhood, you will have two or three and that is a better use of job resources. You will have higher concentration and bigger efficiencies," said Sfakianakis.

There is preliminary evidence that the policies are succeeding in creating more work for Saudi citizens. The labour ministry says it put more than 600,000 locals into private sector jobs since late 2011, and the official jobless rate among Saudis fell to 12.0 percent last year from 12.4 percent in 2011.

However, the absolute number of unemployed climbed to 602,853 people last year from 585,727 in 2011, with Saudis between the ages of 15 and 29 accounting for 78 percent of those without jobs.

If the number of Saudis in jobs increases, more of the money that companies pay in wages is likely to stay in the country, fuelling investment in the non-oil private sector.

"The economy as a whole will benefit from higher employment, higher spending and lower outward remittances. These positives outweigh the efficiency and cost concerns at the corporate level," Soussa said.

The crackdown on foreign workers could also spur social and cultural change in Saudi Arabia. Despite stiff opposition from powerful conservative clerics, the government is pushing for more Saudi women to enter the job market; they may find that easier with less competition from expatriates.

This could help to reduce inequality and poverty in the country, where analysts estimate millions of people live near the poverty line despite Saudi Arabia's oil wealth.

"We are at the point of a huge change in our traditions," said Khalid AlKhudair, founder of the Glowork recruitment agency, which specialises in hiring women.

"One of the reasons that only 30 percent of Saudis own their houses is that families have limited income. Now when a woman works, she adds extra income."