| The region that would become Morocco has been inhabited since the Neolithic era. Berbers arrived about a thousand years before Christ with Phoenician and Carthaginian settlements following on the coast. The Romans, the Vandals, and Islam all invaded Morocco. The tensions between Berbers and Arabs has existed ever since. In the 700s, King Idris ibn Abdullah brought Berbers and Arabs together under a single monarchy that was sustained over two centuries. The capital, Fez, became a major Islamic center of religion and culture. When Spain expelled the last Moors from Spain in 1492, it was the end of golden era. Morocco, Spain, and Portugal vied with each other for next centuries for hegemony over the Western Mediterranean. In the early 1800s, Moroccan piracy in the Mediterranean was a huge problem for Britain and the US. Spain set up colonies in Tangier, and along the Morocco-Mauritania coast. In the early 20th century, France -- already secure in Algeria -- cast its eye on Morocco. Europe was not interested in Morocco's maneuverings to protect its independence. Moroccan independence ended in 1912, with the Treat of Fez, by whose terms France was given Morocco and the Spanish got to retain a sphere of influence in the southwest. Agitation against French rule was somewhat in abeyance during World War II, but in 1947 efforts to rid the country of the French began in earnest. Independence was achieved in 1956; it took another 13 years until the last Spanish enclave was returned to Morocco. Fluctuating stability has characterized Morocco since independence, although the same king, Hassan II, reigned from 1961 through his death in 1999.