Morocco is in many ways a country apart. It nestles on the northwestern tip of Africa, separated from the rest of the continent by the towering Atlas Mountains and by the Sahara itself. Its climate, geography, and history are all more closely related to the Mediterranean than to the rest of Africa, and for this reason visitors are often struck by the odd sensation of having not quite reached Africa in Morocco. In the north, its fine beaches, lush highland valleys, and evocative old cities reinforce this impression. Yet, as one moves south and east, into and over the starkly beautiful ranges of the Atlases, Morocco's Mediterranean character melts away like a mirage.

The three most prominent mountain ranges, which run parallel to each other from the southwest to the northeast, are the Middle Atlas, the High Atlas, and the Anti-Atlas. The ascent of the country's highest peak, Jebel Toukbal (13,665 ft./4,165 m.), is a spectacular and not particularly difficult High Atlas trek. The Moroccan coastline, which fronts onto both the Mediterranean and the Atlantic, offers plenty of great beaches as well as a number of fascinating old coastal cities.

Morocco has been the home of the Berbers since the second millennium B.C. In A.D. 46, Morocco was annexed by Rome as part of the province of Mauritania until the Vandals overran this portion of the declining empire in the 5th century. The Arabs invaded circa 685, bringing Islam. The Berbers joined them in invading Spain in 711, but then they revolted against the Arabs, resenting their secondary status. In 1086, Berbers took control of large areas of Moorish Spain until they were expelled in the 13th century.

The land was rarely unified and was usually ruled by small tribal states. Conflicts between Berbers and Arabs were chronic. Portugal and Spain began invading Morocco, which helped to unify the land in defense. In 1660, Morocco came under the control of the Alawite dynasty. It is a sherif dynasty—descended from the prophet Muhammed—and rules Morocco to this day.

During the 17th and 18th centuries Morocco was one of the Barbary states, the headquarters of pirates who pillaged Mediterranean traders. European powers showed interest in colonizing the country beginning in 1840, and there were frequent clashes with the French and Spanish. Finally, in 1904, France and Spain concluded a secret agreement that divided Morocco into zones of French and Spanish influence, with France controlling almost all of Morocco and Spain controlling the small southwest portion, which became known as Spanish Sahara. Morocco grew into an even greater object of European rivalry by the turn of the century, almost leading to a European war in 1905 when Germany attempted to gain a foothold in the mineral-rich country. By the terms of the Algeciras Conference (1906), the sultan of Morocco maintained control of his lands and France's privileges were curtailed. The conference was an indication of what was to come in World War I, with Germany and Austria-Hungary lining up on one side of the territorial dispute, and France, Britain, and the United States on the other.

In 1912, the sultan of Morocco, Moulay Abd al-Hafid, permitted the French protectorate status. Nationalism expanded during World War II. Sultan Muhammed V was deposed by the French in 1953 and replaced by his uncle, but nationalist agitation forced his return in 1955. In 1956, France and Spain recognized the independence and sovereignty of Morocco. At his death on Feb. 26, 1961, Muhammed V's son succeeded him as King Hassan II. In the 1990s, King Hassan promulgated “Hassanian democracy,” which allowed for significant political freedom while at the same time retaining ultimate power for the monarch. In Aug. 1999, King Hassan II died after 38 years on the throne and his son, Prince Sidi Muhammed, was crowned King Muhammed VI. Since then Muhammed VI has pledged to make the political system more open, allow freedom of expression, and support economic reform. He has also advocated giving more rights to women, a position opposed by Islamic fundamentalists. The entrenched political elite and the military have also been leery of some reform proposals. With about 20% of the population living in dire poverty, economic expansion is a prime goal.

Morocco's occupation of Western Sahara (formerly Spanish Sahara) has been repeatedly criticized by the international community. In the 1970s, tens of thousands of Moroccans crossed the border into Spanish Sahara to back their government's contention that the northern part of the territory was historically part of Morocco. Spain, which had controlled the territory since 1912, withdrew in 1976, creating a power vacuum that was filled by Morocco in the north and Mauritania in the south. When Mauritania withdrew in Aug. 1979, Morocco overran the remainder of the territory. A rebel group, the Polisario Front, has fought against Morocco since 1976 for the independence of Western Sahara on behalf of the indigenous Saharawis. The Polisario and Morocco agreed in Sept. 1991 to a UN-negotiated cease-fire, which was contingent on a referendum regarding independence. For the past decade, however, Morocco has opposed the referendum. In 2002, King Muhammed VI reasserted that he “will not renounce an inch of” Western Sahara.

On May 16, 2003, terrorists believed to be associated with al-Qaeda killed 33 people in several simultaneous attacks. Four bombs targeted Jewish, Spanish, and Belgian buildings in Casablanca. In the 2004 terrorist bombings in Madrid, Spain, numerous Moroccans were implicated.