Criticism of the flag of Saudi Arabia is considered insulting, as it bears the Islamic declaration of faith, and desecration or any other inappropriate use of the flag can lead to serious problems. However, publicly criticising the King, the royal family, or the government of Saudi Arabia, is not tolerated even in the slightest and can attract the attentions of the muttawa or security personnel.
Foreign nationals who breach any of these laws may not get as harsh a sentence as a local would, but this does not rule out corporal punishment such as public floggings, multiple weeks in prison, deportation, or all of the above.
The inscription reads: "There is no God but Allah and Muhammad is the messenger of Allah" and it's underlined by the sword of justice.
The official system of law in Saudi Arabia is Sharia, which is derived from various Islamic texts and governs all members of the faith in the country.
Islamic codes of morality are very keenly enforced by the Muttawa, a volunteer organisation for the religious police (yes, they really have religious police) previously known as the "Committee for the Propagation of Virtue and the Prevention of Vice" and they take their position very seriously.
Anything that looks like preaching or proselytising a religion other than Islam though, is treated with extreme prejudice. The muttawa often come down quite hard on illicit Christian assemblies and the like. Publicly observing any religion other than Islam is literally a crime in Saudi Arabia, so be careful of that one.
The Nejd region around Riyadh is the most strict region in all of Saudi Arabia, so be very careful to be on your best behaviour at all times, with Hejaz around Jeddah being somewhere around the middle.
Generally, the Muttawa don't enter hotels or expat compounds, and you should be able to relax a little more there.
In Saudi Arabia, everything runs around the five daily prayers. More or less everything closes during each prayer for at least 20-30 minutes and the religious police actually patrol the streets and send loiterers off to the nearest mosque. So, avoid being out on the streets during these periods unless you want some hassle from the Muttawa.
The exceptions to the closure during prayer time are hospitals, airports, public transport and taxis, which continue to run normally. Shopping malls also remain open, however the shops inside tend to be closed.
(That's what passes as a smile for a Muttawa.)
The first prayer of the day is fajr, held early in the morning before dawn breaks and generally after this, shops begin to open and people tend to eat breakfast and head to work.
The second prayer of the day is dhuhr, held after true noon during the middle of the day, with the Friday noon prayer, jummah, being the most important one of the week. Generally speaking, even less observant Muslims make the effort to attend the mosque for this one. Aftewards most people tend to have lunch and many shops remain closed to avoid working in the heat of the day, especially during the intense summer months.
The third prayer of the day is asr, which are held in the later afternoon, roughly one and half to two hours before sunset. Many shops open again after this, as the intense heat of the day has usually faded by this point.
The fourth prayer of the day is maghrib, held at sunset and tend to mark the end of the working day in most of the private sector.
The fifth and final prayer of the day is isha'a held between forty five minutes and an hour after sunset. After this, locals tend to head for dinner and it more or less marks the end of their day.
The period between maghrib and isha'a is known amongst expats as the "prayer window" during which time, if you're time is good and you're swift, you can buy your groceries at the supermarket with minimal traffic.
To make matters slightly more complicated, prayer times change daily according to the season and your exact location. Daily prayer times are advertised in the newspaper and the Ministry of Islamic Affairs maintains a handy online prayer time service. It's worth looking at one or both of these to make sure you don't get stuck without vital necessities because you didn't make it to the shops in time.
(Sunset over a Riyadh mosque)
During the period of Ramadan, visitors to Saudi Arabia are expected abide by the restrictions at least in public. This means no eating, drinking, or smoking anything during the daylight hours. Unsurprisingly, restaurants and eating establishments will not sell you food during this period, however some of the better hotels do quietly supply room service during the day. Generally speaking, you will need to make your own preparations.
After the evening prayer, things change quite dramatically. Restaurants in the bazaar and elsewhere open, and are generally very busy until the early hours of the morning with a fairly festive atmosphere.
Alcohol is forbidden and illegal throughout the country, although things are generally more lenient within residential compounds for foreign national or expatriates. Some of these even have full size English style pubs, serving homebrewed beer and wine on Wednesday nights which the police generally turn a blind eye to, however anyone caught either smuggling or distilling alcohol in significant quantities tends to be prosecuted under Saudi law.
Speaking of distilling alcohol, be careful of the local brew, Arak. In addition to being illegal, it's very strong (up to 90% proof) and may contain harmful impurities such as methanol.
Beyond the general importation of illegal drugs and weapons, Saudi Arabia has very strict rules on imports. Alcohol, pork, non-Islamic religious material and pornography are all expressly prohibited. Pornography is VERY widely defined and may include things such as swimsuit calendars. Computers, CDs, DVDs, iPods and other portable media devices have all been seized for inspection from time to time by authorities, and you may lose your device if it has anything deemed to be forbidden on it.
Anything religious that isn't Islam related is pretty much outright banned and illegal in Saudi Arabia. Technically, even items for personal use are banned, although personal religious artefacts have tended to be tolerated in recent years.
All women are required to wear the abaya, a long and loose black robe while in Saudi Arabia, regardless of whether they are local, foreign, Muslim or non-Muslim.
The headscarf is however optional for foreign women, but it is worth brining one along simply to avoid harassment by the religious police or other men intent on causing problems.
(Saudi women are challenging the no driving law)
Saudi law is generally strict where women are concerned and prohibits women from associating with unrelated men. Some places are quite strict on this, and will not even allow a married couple to have dinner with a single man.
Women are also not allowed to drive cars, ride bicycles and generally speaking go pretty much anywhere without a male relative.
Taking photos in Saudi Arabia is a very touchy subject. If you get a feeling you probably shouldn't take a phot of something, then don't. Anything that's government related including ministries, airports, military facilities or looks like it could be a government building, don't take a photo of it. You risk being hauled off to jail for espionage which really isn't a joke.
Don't take photos of Saudi Arabian men without their permission, and don't even point a camera in the vaguest direction of women. They don't have a sense of humour where this is concerned and the muttawa may well be on you before you can say "sorry, what?" and you'll probably be shocked when they smash your camera or worse.
(Not funky, not cold, but it is Medina)