The interior ministry called on expats to "show consideration for feelings of Muslims" and "preserve the sacred Islamic rituals". Otherwise, a ministry statement said, Saudi authorities will cancel violators’ work contracts and expel them.
Saudi Arabia’s population of 27m includes some 8m foreigners, including Asians, Arabs, and Westerners.
The Sunni kingdom is the home of Islam’s holiest sites. The warning serves as a reminder that the Western-allied monarchy must answer to a strict religious establishment that holds de facto veto power over many of its policies.
With challenges to the established order growing bolder from a population nearly half of which is under 30, Saudi Arabia has recently made some moves to show moderation.
It is sending female athletes to the Olympics for the first time this year. King Abdullah has promised to allow women to run and vote in municipal elections in 2015. He also has tried to rein in the country’s feared morality police.
But Saudi rights advocate Waleed Aboul Khair believes that, while such moves give the impression that the grip of hardliners has eased, "when you look around, nothing has changed and suppression has not changed". He is facing trial for "tarnishing the kingdom’s reputation," mostly by his political activism for women’s rights and other issues.
The prince newly appointed to handle most aspects of law enforcement is known as a strict adherent to religious rules. Prince Ahmed bin Abdulaziz was governor of Mecca before becoming interior minister.
Saudi Arabia is wary of the wave of Arab Spring uprisings that has toppled leaders in Egypt, Libya and Tunisia.
It followed a carrot-and-stick strategy to contain unrest by pledging $120bn for the kingdom’s lower-income groups. It has cracked down on protests, especially in eastern regions dominated by Shiites demanding greater rights, and is steering a middle course between conservatives and reformers among the Sunni majority.