Under the watchful eyes of Saudi policemen slouched in their squad cars along a rundown street, little knots of Ethiopian men sit chatting on doorsteps and sprawl on threadbare grass at one of Riyadh's busiest junctions. These are tense, wary times in Manfouha, a few minutes' drive from the capital's glittering towers and swanky shopping malls.

Manfouha is the bleak frontline in Saudi Arabia's campaign to get rid of its illegal foreign workers, control the legal ones and help get more of its own citizens into work. This month two or three Ethiopians were killed here after a raid erupted into full-scale rioting.

Keeping their distance from the officers parked every few hundred metres, the Ethiopians look shifty and sound nervous. "Of course I have an iqama [residence permit]," insisted Ali, a gaunt twentysomething man in cheap leather jacket and jeans. "I wouldn't be standing here if I hadn't."

But he didn't have the document on him. And his story, in broken Arabic, kept changing: he was in the process of applying for one; actually, no, his kafeel (sponsor) had it. It didn't sound as if it would convince the police or passport inspection teams prowling the neighbourhood.

Until recently, of the kingdom's 30 million residents, more than nine million were non-Saudis. Since the labour crackdown started in March, one million Bangladeshis, Indians, Filipinos, Nepalis, Pakistanis and Yemenis have left. And the campaign has moved into higher gear after the final deadline expired on 4 November, with dozens of repatriation flights now taking place every day. By next year, two million migrants will have gone.

No one is being singled out, the authorities say. Illegal workers of 14 nationalities have been detained and are awaiting deportation. But the Ethiopians, many of whom originally crossed into Saudi Arabia from Yemen, are widely portrayed as criminals who are said to be mixed up with alcohol and prostitution. "They'd rather sit here and do nothing than go home because maybe they will get some kind of work," sneered Adel, one of the few Saudis to brave Manfouha's mean streets. "In Ethiopia there is nothing for them."

Ethiopian men in Manfouha, southern Riyadh. Photograph: AP

The Ethiopian government said this week that 50,000 of its nationals had already been sent home, with the total expected to rise to 80,000. Every day hundreds more trudge through the gates of the heavily guarded campus of Riyadh's Princess Noora University, awaiting a coach ride to the airport, fingerprinting, a final exit visa and their one-way flight to Addis Ababa.

Incidents involving Ethiopians are reported almost obsessively on Twitter and YouTube and across mainstream media outlets. Ethiopians complain in turn of being robbed and beaten, and of routine abuse and mistreatment by their Saudi employers. Protests have been held outside Saudi embassies in several countries. Prejudice is so rife that the Ethiopian ambassador had to insist that the Muslim or Christian beliefs of his compatriots prevented them from practising sorcery.

Yet other foreign workers show little sympathy or solidarity. "These people believe this is their country," said Mohamed, a Bangladeshi who runs a petrol station in the centre of Manfouha. "They are big trouble, and dangerous. I've seen them carrying long knives."

Mokhtar, a Somali, had no problem with them. "I'm not afraid of the Ethiopians because we are neighbours," he grinned. "But the Saudis are. I have heard the stories about them breaking into houses and I've seen them smashing up cars on this road." Ansar, another Ethiopian who blamed his boss for withholding his iqama, condemned his violent compatriots as kuffar – infidels.

Saudi Arabia's addiction to cheap foreign labour goes back to the oil boom and religious awakening of the mid-1970s. In recent years it has come to be seen as an enormous problem that distorts the economy and keeps young people out of the labour market. But the government turned a blind eye and little happened until March. And it remains to be seen whether the notorious kafala (sponsorship) system – responsible for many abuses – can be reformed or replaced. Saudis say one of the biggest problems is foreigners who have fled their original kafeel and effectively disappeared.

"We will need two decades to get back to where we were in the 1970s," predicted Turki al-Hamad, a writer who grew up in the eastern city of Dammam, where Saudis used to work in the Aramco oilfields. "We are better off economically than we were then, but much worse off socially."

Foreign workers wait with their belongings before boarding police buses in Riyadh. Photograph: Fayez Nureldine/AFP/Getty Images

The "regularisation" campaign has had some unintended though probably predictable consequences. The sudden acceleration of departures, both voluntary and forced, has left building sites deserted and corpses unwashed. Some schools have closed due to an absence of caretakers. In Jeddah a septic tank overflowed disastrously because the cleaners had all fled after hearing word of an impending police raid. Rubbish is piling up everywhere. In Medina undocumented foreigners dressed up in robes to blend in and avoid attention.

"Two friends of mine were arrested in a furniture shop," said Mohamed Shafi, a driver from Kerala in India. "Their kafeel said it was too expensive to regularise their status so he sacked them. Now they are in a detention centre and there's no way to contact them."

Middle-class Saudis bemoan the sudden disappearance of their maids and drivers (an economic necessity for women, who are banned from driving) and find themselves sucked into a costly labyrinth if they try to intervene. "I had to use the black market and I've paid 100,000 riyals [£16,000]) to regularise my workers," complained a British manager. Embassies are being overwhelmed by nationals frantically seeking the documents they need to allow them to leave the country. "You could see this was a disaster waiting to happen," said another European resident. "It just wasn't thought through. It's all about incompetence."

In the long term the expulsions should help the wider "Saudisation" programme, based on the nitaqat or quotas for employing Saudis in certain sectors depending on the size of the enterprise. But this is not only about the menial work that pampered Saudis refuse to do. Hundreds of thousands of Europeans, Lebanese, Syrians and Egyptians work in the private sector. According to the latest figures from the IMF, 1.5m of the 2m new jobs created in the last four years went to non-Saudis. Entire areas of the economy are controlled by foreigners.

Oil prices are still high and growth enviably healthy but everyone knows that the vast state sector – providing jobs for the boys, if not for the girls – will have to shrink in years to come. Officially unemployment is already 12%; it is probably more than twice that among the two-thirds of the population who are under 30. Every year about 100,000 graduates enter the job market. Technical colleges are now providing vocational training.

"Saudisation can only succeed if a company really wants to do it," argued Abdelrahman al-Mutlak, a businessman. "It can't be done by regulation. Too many Saudis still think it's a lot more prestigious to hire a foreigner even if there is perfectly good Saudi candidate available."

An Ethiopian worker argues with a member of the Saudi security forces in Manfouha. Photograph: Reuters

Economists point out that with fewer foreign workers sending remittances home, more money will stay in the country and help boost consumer spending. Official accounts of the expulsion campaign have an almost apologetic tone and stress the efforts the security forces are making and the difficulties they face. But the Saudi Twittersphere echoes to complaints that Prince Mohammed Bin Nayef, the interior minister (and a likely future king) has been too soft on what one angry tweet called "criminal gangs of Ethio-Israelis".

It seems clear that the public is cheering on the government on the foreign labour issue. "It is the right thing to do," said Fawziya al-Bakr, a lecturer. "We've reached the point where people were trading in these workers and women were running away to become prostitutes. This is a problem that has built up over 40 years. It can't just be swept up in nine months. But it has to be done. When everything is legalised it will be easier to control."

For Kamel, a Shia businessman from Qatif, in the Eastern province, the expulsions are long overdue. "These people live in ghettoes run by gangsters," he said. "If they are not here legally we don't want them. It just creates problems. They had a period of grace but didn't do anything about it. In Manfouha the Ethiopians started attacking the properties of Pakistanis and Afghans. That was a big mistake. The government says it can solve this problem – so it's really acting tough."

Abuses and exploitation

More than eight million migrant workers in Saudi Arabia – more than half the entire workforce – fill manual, clerical, and service jobs. "Many suffer abuses and labour exploitation, sometimes amounting to slavery-like conditions," says Human Rights Watch.

The kafala system ties foreign workers' residency permits to sponsoring employers whose consent is required for workers to change jobs or leave the country. A Pakistani man employed as a driver, for example, needs permission to work in a shop. 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.

Thousands work illegally under the so-called "free visa" arrangement, with Saudis posing as sponsoring employers and importing workers to staff fictitious businesses. Workers who enter Saudi Arabia under this scheme work outside the regulatory system for companies and businesses that are happy to avoid official scrutiny while the worker pays often extortionate annual and monthly fees to the free-visa sponsor to renew residency and work permits.