A TRIP around the bustling shopping centres of Riyadh, with their wide range of familiar European and American retailing brands, gives the superficial impression of a country that is open to the outside world. Some of the world’s biggest energy and manufacturing firms, from Exxon Mobil to Unilever, have operations in the kingdom too. The Gulf’s wealthiest economy, with low taxes, economic growth of almost 4% last year, a population of 30m, a free-spending government and cheap energy supplies, Saudi Arabia should be as big a draw for businesses as its holy city of Mecca is for pilgrims. But while stepping up its efforts to promote the entry of foreign firms, the Saudi government is simultaneously becoming more choosy about which ones it lets in, and which can stay.

This week SAGIA, the government agency for promoting business investment, announced a new fast-track service to process applications from foreign investors within five days. Last month the agency held a conference in London to attract more investment from British firms. But just a few days before announcing the fast-track service, the agency’s boss, Abdullatif al-Othman, said it would kick out of the country those smaller foreign firms that it judged were failing to add enough value to the Saudi economy. In recent months the agency has cancelled the licences of dozens of foreign firms for various breaches of the conditions under which they were admitted. More companies are now at risk of being thrown out for not obeying a law that came into full force last year, requiring them to employ a proportion of Saudis.

The government’s pickiness is ill-timed, given how hard it has been in recent years for Saudi Arabia to attract foreign businesses. According to UNCTAD, a UN agency which measures such things, foreign direct investment in Saudi Arabia declined by more than two-thirds, to $12.2 billion, in the four years to 2012, when it fell behind Turkey as the broader Middle East’s most attractive investment destination.

Nevertheless, says Mr Othman, the government is no longer interested in companies that “come, sell equipment and leave, like [in] the 1980s.” His agency is also keen to chase away foreigners who set up shell companies to get around the country’s strict residency requirements. But diplomats and businesspeople in Saudi Arabia say the government is casting its net wider. Companies that look likely to employ and train lots of locals in high-level skills are still encouraged, such as, say, Jaguar Land Rover, a British carmaker that is planning to build a plant there. So are ones that can help the country meet its fast-growing need for new infrastructure, such as Chinese construction firms. But ones that might provide competition for sluggish local firms (which would benefit Saudi consumers and the economy as a whole) are not so welcome.

Despite the efforts of SAGIA and other agencies to make it easier for businesses to enter the country, the co-ordination between state bodies is often poor, and it is still necessary to have the right connections to negotiate official bureaucracy. Getting visas for foreign staff is a nightmare of unpredictability. Even Saudi-owned firms suffer these problems. Raid Ismail, a retailer in Riyadh, says a business must have a shopfront to get a permit from the municipality, and visas for foreign staff, even once it has a licence to operate from the central government. But this takes so long that the shop can sit empty, with rent accumulating, for up to a year. “You are at the mercy of an individual on duty on that day because rules are never applied quite the same as they are stated,” says Princess Reema bint Bandar al-Saud, who operates the Harvey Nichols franchise in Riyadh.

Saudi workers tend to be more expensive and less productive than foreign ones, so the new quotas for employing locals, known as nitaqat, are a particular problem for smaller foreign firms, which cannot afford training schemes to bring Saudi staff up to speed. Foreign businesspeople accept that the government has to find ways to improve its citizens’ skills and employment prospects—especially after the protests that have shaken the Arab world in recent years—but point out that the effect has been to stifle the small-business sector that the government is otherwise seeking to promote. As UNCTAD’s latest report on foreign investment notes, in many industries there are not enough qualified Saudis willing and able to do the jobs the government wants them to be given.

To make things worse, SAGIA says it intends to start ranking both domestic and foreign companies according to their compliance with its objectives, and offer incentives, from cheaper energy to longer visas for foreign staff, to those it approves of. The risk is that this degenerates into bestowing favours on the well-connected. So although the government’s heavy spending provides lots of opportunities for businesses, its meddlesome approach makes the country an unpredictable place. For many foreign firms, Saudi Arabia is interesting enough to be worth keeping an eye on, but for now they have plenty of other big economies to put their money into.