Under the command of Uqba ibn Nafi of the Umayyads the first Islamic conquest of North Africa occurred in 670 AD, and their language, system of government and Islam quickly spread to Morocco.
Even after the Arab ruling had diminished, the Berbers slowly continued to convert to Islam, and the first Muslim state, the Kingdom of Nekor, was founded in the Rif Mountains in 710.
About a century after the Arab conquest of North Africa, successive Moorish dynasties began to rule in Morocco, and during the 16th century, the Sa'adi monarchy, particularly under Ahmad Al-Mansur (1578-1603), repelled foreign invaders and inaugurated a golden age.
In 1912, the French imposed a protectorate over the country, and under their ruling the natives were denied many freedoms. The children of noble Moroccan families were given a French education, however the rise of this young intellectual class produced a nationalist movement intent on restoring the country to its own people.
Morocco virtually annexed Western Sahara during the late 1970s, but final resolution on the status of the territory remains unresolved.
Upon independence, Morocco restored itself as a constitutional monarchy with an elected parliament.
A number of opposition political parties have been formed in the past several years, which are legal.
Arab Spring protests reached Morocco in February 2011, and citizens gathered in Rabat protesting for a new constitution. By July of that same year, King Mohammed VI won a victory on a reformed constitution he initially proposed to appease the protestors.
Demonstrations continued through 2012 by citizens pushing for deeper reforms, and accusing the government of failing to deliver.
Morocco was the first country in North Africa to install a 3G network. Offshore service centers and IT activities, by 2015, will contribute over $500 million to the country's GDP. Morocco is the world's largest exporter of phosphate and the third-largest producer of phosphorous. It currently has a population of 1,655,753.