Hassan was born in Rabat in 1929 under the French Protectorate, and his early years were dominated by Morocco's struggle for independence. His father, Sultan Mohammed V, was a statesman of talent and vision who succeeded in unifying the liberation movement under the monarchy. This earned him and his family a period in exile in Madagascar in the early 1950s but ultimately ensured that the monarchy survived the transition to independence in 1956.
After studying law at Bordeaux University Hassan returned to Morocco, where his father invested him as Crown Prince and appointed him commander of the Royal Armed Forces in 1957. In this role Hassan was responsible for the ruthless suppression of a Berber rebellion in the Rif and for mopping up revolutionary elements of the liberation movement opposed to the monarchy. During this period the young prince fell under the influence of a Berber officer, Mohammed Oufkir, who was to become Hassan's confidant and adviser in the first decade of his reign.
When Mohammed V died unexpectedly in 1961 many doubted that Hassan would manage to unite the country behind him. But his father's legacy, above all the prestige with which Mohammed V had invested the monarchy through his support of the liberation struggle, was an advantage which Hassan was quick to exploit. Hassan also enjoyed immense powers of patronage that he used from the outset to prevent the disparate social, political and tribal groups that make up Morocco from uniting against him. Furthermore, in what remains even today a deeply conservative and religious society, the king's quasi-mystical status as descendant of the Prophet Muhammad and commander of the faithful gave Hassan real advantages over his opponents.
Mohammed V had pursued a policy of non-alignment. Hassan II chose to forge strong alliances with the West, particularly the colonial power, France, and the United States, whose regional interests he vigorously promoted. On this account, King Hassan came to be seen as an enemy of nationalist and progressive trends in the Arab world and this in turn led to several armed confrontations with his eastern neighbour Algeria and distinctly cool relations with nationalist Arab leaders like the Egyptian President Gamal Abdel Nasser.
However, as mainstream Arab politics drifted towards the right with the decline of the Soviet Union, King Hassan came to be seen as one of the more influential and well-connected Arab leaders. Through Morocco's large and influential Jewish community King Hassan maintained friendly, though secret, relations with Israel and at the behest of his Western allies played a key role in the secret negotiations which led to the 1979 Israeli Egyptian peace deal.
King Hassan's support of Western interests was not confined to the Arab world. On several occasions he helped his Western allies in Africa too, most notably in 1977 when he sent Moroccan troops to what was then Zaire to help protect the mineral resources of Shaba province from an allegedly pro-Soviet rebellion. King Hassan's involvement in Zaire and elsewhere in sub-Saharan Africa is said to have led to the establishment of business arrangements that brought Hassan huge personal gains. In this he was merely continuing, in modern mode, the ancient tradition of Trans-Saharan trade, mostly in gold, from which his Barbary predecessors derived their great wealth.
King Hassan's pro-Western stand in Africa and the Arab world was repaid in Western economic and political support at home, where from the outset he faced numerous challenges including at least four conspiracies and two attempted coups d'etat. The King dealt with these with a characteristic mixture of brutality, cunning, courage and flexibility.
The first threat came from the radical opposition led by the charismatic and popular Mehdi Ben Barka. Ben Barka was implicated in a 1963 plot to mount an armed rebellion and fled to France, where, in 1965, he disappeared. He was presumed to have been abducted and murdered by the Moroccan secret service, possibly with the connivance of some French officials. The affair became a cause celebre and led to a trial at which Hassan's right-hand man, General Oufkir, who was by now Minister of the Interior, was sentenced in absentia.
In the early 1970s King Hassan faced challenges from within his own trusted circle of Berber army officers. In 1971 a group of army cadets attacked a birthday party the king was holding at the seaside palace of Skhirat outside Rabat. A number of prominent guests were killed. It is said that the King induced the cadets to lay down their arms by reciting to them the first verse of the Koran. The coup collapsed and the alleged ringleaders were personally executed by General Oufkir.
A year later, as the king was returning from Europe, his Boeing was attacked over the Rif Mountains by Moroccan air force jet fighters. When the badly damaged Boeing landed at Rabat airport it again came under attack from the air. Hassan managed to escape unhurt. It emerged that General Oufkir was behind both this attack and the coup attempt of the previous year. Oufkir was either killed or persuaded to commit suicide.
King Hassan inflicted a cruel revenge on Oufkir's wife and children, who suffered years of imprisonment and house arrest before being allowed to go into exile in the mid-1990s.
King Hassan's ruthlessness in dealing with his opponents was tempered by political flexibility. Throughout his reign, periods of emergency during which the King effectively exercised absolute power were alternated with periods of political reform in which Morocco was allowed limited parliamentary rule with political parties and independent media operating within the set bounds. This was not merely window dressing. King Hassan well understood that in order to orchestrate and balance the political forces in the country effectively he needed to give them a measure of freedom and self-respect.
In 1975 King Hassan found in the Western Sahara a useful and unifying distraction from problems closer to home. In an effort to accelerate the withdrawal of Spain from its desert colony on Morocco's southern borders and at the same time to stake Morocco's own ancient claim to the territory, King Hassan dispatched his Prime Minister at the head of some 400,000 civilians into the desert on the famous Green March.
It was a dramatic display of resolve and unity and from a domestic political point of view it paid off well. Even King Hassan's most strident critics at home do not doubt that the Western Sahara belongs to Morocco. But, although the Spanish withdrew in 1976, King Hassan's irreversible action led to a long and exhausting war with the Saharawi tribes who, with the backing of Algeria, formed a guerrilla army, Polisario, determined to resist Morocco's occupation of the Western Sahara to the last man.
The war against Polisario guerrillas proved an immense drain on Morocco's economy. But having staked his prestige on Morocco's claim, King Hassan was politically unable to agree to any international settlement that would not guarantee Morocco's sovereignty over the territory. Although a UN- backed ceasefire came into effect in 1989, there has still been no agreement on the terms of a proposed referendum on self-determination.
The Islamist opposition to King Hassan first made its appearance in the mid-1970s, challenging the religious legitimacy on which the Sherifian monarchy was supposedly based. It was a serious threat but one which countless Moroccan rulers had faced in the past from fanatical desert sects and from pious hermits. As "commander of the faithful" and heir to Africa's oldest ruling dynasty, King Hassan was certainly better equipped to counter the Islamist threat than the rulers of secular, modernising Arab regimes like Algeria, Syria or Egypt.
Furthermore, in the 1990s, when the Islamists had emerged as the only credible opposition force left in most of the Arab world, King Hassan was able to play upon the fears raised by Algeria's civil war to convince many Moroccans as well as his Western allies that he was an indispensable bulwark against the chaos which the Islamists were widely seen to threaten.
King Hassan's treatment of his Islamist opposition was therefore ambiguous. While he refused to allow the Islamists any formal political status and did not hesitate to crack down hard when they made trouble, beating up the militants and putting their leader, Abd Al-Salaam Yassin, under house arrest, he never sought an all-out confrontation.
King Hassan was a complex man who inspired devotion, respect and fear in almost equal measure. So careful was he to maintain his public image - or rather images, as he had several to suit different occasions - that it is impossible to gauge what kind of man he was in private. Perhaps he never entirely shed his chameleon's skin.
After his betrayal by Oufkir he is said to have declared that henceforth he would trust no one. And he appears to have kept his word. He kept aloof even from his ministers and close advisers, who were for the most part incapable of taking important decisions without the nod of royal approval.
That he was a highly intelligent man who over the years became a master of statecraft there can be no doubt. His record is badly marred by his cruel, sometimes vengeful, treatment of his political opponents and by the large-scale corruption that he encouraged among his subordinates in order the better to control them. But, if King Hassan is judged by the effect rather than the means of his rule, then his achievements appear rather remarkable, especially when measured by the standards of the rest of Africa and the Arab world. Under King Hassan Morocco enjoyed stability, continuity and respect. Economic development was achieved without momentous unrest or social trauma. And within limits Moroccans were allowed a measure of political freedom - last year the opposition leader, Abderrahmane El Youssoufi, even becoming prime minister.
It is unlikely that a weaker leader would have achieved as much.
Moulay Hassan bin Mohammed: born Rabat 9 July 1929; invested 1957 as Crown Prince Moulay Hassan of Morocco; Minister of Defence 1960-61, 1972- 73; Vice-Premier 1960-61, Prime Minister 1961-63, 1965-67; succeeded 1961 as King Hassan II; married 1961 Lalla Latifa (two sons, one daughter); died Rabat 23 July 1999.Reuse content