The Kingdom of Morocco is the most westerly of the North African countries known as the Maghreb.Strategically situated with both Atlantic and Mediterranean coastlines, but with a rugged mountainous interior, it stayed independent for centuries while developing a rich culture blended from Arab, Berber, European and African influences.
Morocco was a French protectorate from 1912 to 1956, when Sultan Mohammed became king. He was succeeded in 1961 by his son, Hassan II, who ruled for 38 years. He played a prominent role in the search for peace in the Middle East, given the large number of Israelis of Moroccan origin, but was criticised for suppressing domestic opposition.
A truth commission set up to investigate human rights violations during Hassan's reign has confirmed nearly 10,000 cases, ranging from death in detention to forced exile.
After his death in 1999 Hassan was succeeded by his son, who became King Mohammed VI and was seen as a moderniser. Mohammed VI introduced some economic and social liberalisation, and in 2011 he revised the constitution in response to "Arab Spring"-style protests. However, the monarch still retains considerable power and can veto most government decisions.
Morocco has expressed interest in becoming a member of the European Union, its main trade partner, but there appears to be little enthusiasm for this within the bloc.
To the south, the status of Western Sahara remains unresolved. Morocco annexed the territory in 1975 and a guerrilla war with Algerian-backed pro-independence forces ended in 1991. UN efforts have failed to break the political deadlock.
To the north, a dispute with Spain in 2002 over the tiny island of Perejil revived the issue of the sovereignty of Melilla and Ceuta. The small enclaves on the Mediterranean coast are surrounded by Morocco and have been administered by Madrid for centuries.
Morocco has been given the status of non-Nato ally by Washington, which has praised its support for the US-led war on terror. After deadly suicide bombings in Casablanca in 2003, Morocco launched a crackdown on suspected Islamic militants.