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. There has been some economic and social liberalisation, but the monarch has retained sweeping powers.
Morocco is bidding for membership 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.
King: King Mohammed VI
Groomed for "kingship", as his late father King Hassan II referred to his upbringing, Mohammed VI became monarch in 1999.
He initiated political and economic changes and an investigation into human rights abuses during his father's rule.
The king says the fight against poverty is a priority, earning him the name "guardian of the poor". Economic liberalisation has attracted foreign investment and officials point to better basic services in shanty towns and rural areas. But some non-government groups say little has changed, with poverty still widespread and unemployment remaining high.
A key reform has been the Mudawana, a law which grants more rights to women. The king has said it is in line with Koranic principles, but religious conservatives have opposed it.
Bomb attacks in Casablanca in 2003 prompted the enactment of new anti-terrorism laws and a reinvigorated campaign against extremists. But some rights groups say the measures have eroded human rights.
King Mohammed married computer engineer Salma Bennani in 2002. They have a son, Crown Prince Moulay Hassan, born in 2003, and a daughter, Princess Lalla Khadija, born in 2007.
Under the constitution, the king can dissolve parliament and dismiss or appoint the prime minister.
Prime minister: Abbas El Fassi
Mr El Fassi, leader of the conservative Istiqlal Party, took office in September 2007 after his party emerged as the largest in parliamentary elections.
Born in 1940, Mr El Fassi has served as a minister and diplomat since 1977, including a stint as ambassador to France in 1990-1994. He was minister of state in the coalition government of his predecessor, Driss Jettou, from 2002-2007.
His government also includes the Socialist Union of Popular Forces, the National Rally of Independents, and the Party of Progress and Socialism.
A chronology of key events:
7th Century AD - Arab invasion; Idris founds the first major Muslim dynasty.
10-17th Centuries - Dynasties and religious movements come and go, including the Almoravid movement which at its peak controlled Morocco and parts of present-day Algeria and Spain.
1860 - Dispute over Spain's Ceuta enclave; Spain declares war, wins a further enclave and an enlarged Ceuta in the settlement.
1884 - Spain creates a protectorate in coastal areas of Morocco.
1904 - France and Spain carve out zones of influence.
1906 - Algeciras Conference in Spain; France and Spain get the go-ahead to police Moroccan ports and collect customs fees.
French protectorate
1912 - Morocco becomes a French protectorate under the Treaty of Fez, administered by a French Resident-General. Spain continues to operate its coastal protectorate. The sultan has a largely figurehead role.
1921-6 - Tribal rebellion in Rif mountains is suppressed by French and Spanish troops.
1943 - Istiqlal - Party of Independence - founded to press for independence.
1956 March - End of French protectorate after unrest and strong nationalist sentiment. Spain keeps its two coastal enclaves. Sultan Mohammed becomes king in 1957.
1961 - Death of King Mohammed; King Hassan II comes to power.
1963 - First general elections.
1965 - Social unrest: King Hassan declares a state of emergency and suspends parliament.
1971 - Failed attempt to depose king and establish republic.
Polisario movement
1973 - Polisario movement formed, aims to establish an independent state in Spanish Sahara, a territory south of Morocco controlled by Spain. The group has Algerian support.
1975 6 November - The Green March: King Hassan orders 350,000 civilian volunteers to cross into Spanish Sahara.
1975 December - Spain agrees to leave Spanish Sahara, soon to become Western Sahara, and to transfer it to joint Moroccan-Mauritanian control. Algeria objects and threatens military intervention. Moroccan forces enter and occupy the territory.
1976 - Moroccan and Algerian troops clash in Western Sahara. Algeria announces the formation of the Saharawi Arab Democratic Republic (SADR) with a government-in-exile. Morocco and Mauritania divide-up Western Sahara.
1976 onwards - Fighting between Moroccan military and Polisario forces; the war is a considerable financial drain on Morocco.
1983 - Summit between King Hassan and Algerian president prompts thaw in relations.
1983 - King cancels planned elections amid political unrest and economic crisis.
1984 - Morocco leaves the Organisation of African Unity in protest at the SADR's admission to the body. Polisario claims to have killed more than 5,000 Moroccan soldiers between 1982-85.
1988 - Resumption of full diplomatic relations with Algeria.
Sahara ceasefire
1991 - UN-monitored ceasefire begins in Western Sahara, but the territory's status remains undecided and ceasefire violations are reported. The following decade sees much wrangling over a proposed referendum on the future of the territory but the deadlock is not broken.
1998 - Morocco's first opposition-led government comes to power.
1999 - King Hassan II is succeeded by his son, Mohammed VI.
2001 November - King Mohammed starts a controversial tour of Western Sahara, the first by a Moroccan monarch for a decade.
2002 July - Morocco and Spain agree to US-brokered resolution over the disputed island of Perejil. Spanish troops had taken the normally-uninhabited island after Moroccan soldiers landed on it and set up tents and a flag.
2002 December - Morocco and Spain hold their first talks since their conflict over Perejil. In January 2003 they agree to return ambassadors.
2003 February - Casablanca court jails three Saudi members of al-Qaeda for 10 years after they were accused of plotting to attack US and British warships in the Straits of Gibraltar.
2003 May - More than 40 killed when suicide bombers attack several sites in Casablanca, including a Spanish restaurant and Jewish community centre.
2004 February - Powerful earthquake hits the north; more than 500 people are killed.
2004 July - Free trade agreement with the US comes into effect. It follows Washington's designation of Morocco as a major non-Nato ally.
2005 September-October - Hundreds of African migrants try to storm Morocco's borders with the Spanish enclaves of Melilla and Ceuta. Morocco deports hundreds of the illegal migrants.
2005 December - Truth commission investigating human rights abuses during the rule of King Hassan II says 592 people were killed between 1956-99.
2006 April - Chinese President Hu Jintao visits, signs a series of trade agreements.
2006 January - Spanish Premier Jose Luis Rodriguez Zapatero visits the the Spanish enclaves of Melilla and Ceuta. He's the first Spanish leader in 25 years to make an official visit to the territories.
2007 January - Five men freed from US custody at Guantanamo Bay in 2004 are cleared of terrorism-related charges by a court in Morocco.
2007 April - Three suspected suicide bombers blow themselves up in Casablanca, a few weeks after a suicide blast in an internet cafe weeks earlier.
Two suicide bombers blow themselves up outside US diplomatic offices in Casablanca.
Morocco unveils an autonomy blueprint for Western Sahara to the United Nations. Independence movement Polisario rejects the plan and puts forwards its own proposal.
2007 June - Morocco and the Polisario Front hold UN-sponsored talks in New York but fail to come to any agreement.
2007 September - Parliamentary elections. The conservative Istiqlal party, a member of the ruling coalition, wins the most votes.
2007 November - Spanish King Juan Carlos visits Ceuta and Melilla, angering Morocco which demands the return of the enclaves.
2008 February - Police arrest 36 people allegedly linked to Abdelkader Belliraj, a Belgian-Moroccan accused of leading the local branch of al-Qaeda.
2008 April - Spanish police arrest two Moroccans wanted over 2003 Casablanca bombings, plan extradition.
Nine prisoners convicted over 2003 Casablanca suicide bombings escape from Kenitra gaol north of Rabat.
2008 May - Security forces say they have dismantled an al-Qaeda-affiliated network planning attacks at home and in Belgium.
2008 June - Court convicts 29 men from "Tetouan cell" for holding illegal meetings and recruiting Moroccans to fight in Iraq.
2008 July - Police arrest 35 people accused of recruiting for al-Qaeda in Algeria and Iraq and planning attacks in Morocco.
2008 August - Morocco arrests 15 people who made up alleged al-Qaeda-affiliated "Fath al-Andalous" group.
2008 September - US Secretary of State Condoleezza Rice visits as part of North African tour. Discusses anti-terrorism measures, political reform and the Western Sahara.
Fouad Ali al-Himma, a confidant of King Mohammed, forms an alliance around his new Authenticity and Modernity Party. The party has the potential to dominate parliament.
Court sentences more than 40 people to long prison sentences over Casablanca internet cafe suicide bombing that injured three.
2008 December - Two Moroccan men, Abdelilah Ahriz and Hicham Ahmidan, sentenced to 20 and 10 years in jail respectively in Morocco over Madrid train bombings of 2004.
2009 February - Islamist Saad Housseini given 15-year sentence over 2003 Casablanca bombings that killed 45 people. Also wanted in Spain over Madrid bombings.
2009 March - Morocco breaks off relations with Iran after Iranian politician said Bahrain used to be Iranian province.
2009 July - Alleged al-Qaeda leader in Morocco, Abdelkader Belliraj, imprisoned for life on being found guilty of leading an Islamist militant group and committing six murders in Belgium.
2010 August - Tension between Spain and Morocco over incidents near the border with the Spanish enclave of Melilla.
2010 August - Civic online campaign launched against a law penalising those who eat in public during the fasting hours of Ramadan.
2010 November - Security forces storm a protest camp in disputed territory of Western Sahara, triggering violent demonstrations in regional capital Elayoun.
2010 December - Western Saharan delegates at a youth festival in South Africa try to replace the Moroccan flag with an anti-Moroccan banner, provoking clashes.