The sultan Muhammad V, ruling his newly independent nation, proclaims his intention of turning it into a constitutional monarchy.
His first act in this direction is to transform himself into a monarch. He assumes in 1957 the title of king.
Government elections eventually take place in 1960, but in their wake the king himself takes the role of prime minister with his heir, crown prince Hassan, as his deputy.
The promised constitution is postponed until 1962, but by then Muhammad V has died. He is succeeded in 1961 by his son, as King Hassan II.
For nearly forty years Hassan rules Morocco, often with disregard for the civil rights of political opponents but in broad terms successfully – surviving attempted coups (the most serious in 1971) and periodic riots (particularly in Casablanca in 1981).
There are several attempts at constitutional reform, and elections to parliament become a regular feature of Moroccan life.
But real power remains with the king until his death in 1999, when he is succeeded by his son as Muhammad VI.
Internationally the main feature of Hassan’s reign is territorial disputes with Morocco’s immediate neighbors, Algeria and Mauritania.
The border with Algeria has been redrawn, to Morocco’s disadvantage, during the French colonial period.
Hassan’s rejection of the existing border is of economic importance, since the disputed region is rich in iron ore. In 1970 a compromise is reached whereby the ore is exploited by both nations in partnership.
The other dispute, in the south, is of greater significance and longer duration.
It concerns Mauritania and the Western Sahara. In the 1960s Hassan claims that Morocco has a historic right to Mauritania itself.
But from 1969 he changes tack and concentrates his energies on winning the Western Sahara.