For 14th century caliph of Cairo, see Al-Hakim II.

**Al-Hakam II**, also known as **Abū al-ʿĀṣ al-Mustanṣir bi-Llāh al-Hakam b. ʿAbd al-Raḥmān** (أَبُو الْعَاصٍ الْمُسْتَنْصِرِ بِاللهِ الْحَكْمِ بْن عَبْدِ الرَّحْمَنِ; 13 January 915 – 16 October 976), was the Caliph of Córdoba. He was the second Umayyad Caliph of Córdoba in Al-Andalus, and son of Abd-al-Rahman III and Murjan. He ruled from 961 to 976. His adopted caliphal title was *Al-Mustanṣir* (Arabic: المستنصر).

Al-Hakam II was designated his father's successor as early as 919 at the age of four. During his father's reign, he participated actively in the caliph's administration and gained experience in the palace and on military campaigns. The reign of Al-Hakam II saw the strengthening of the state. He pursued military expansion, both in the north and the south. In North Africa, he competed with the Fatimids for control of the trans-Saharan trade, and subdued the Idrisids of Morocco. In the north, he gained enough esteem of the Christian kings that they regularly solicited his arbitration in their own disputes. During his reign, Al-Andalus was the most powerful state in Europe.

A patron of art and culture, Al-Hakam's library of over 400,000 volumes and forty-four-volume catalogue was one of the largest Islamic collections of the time.
Córdoba, during his reign, became one of the leading centres of Islamic culture. Historians have complemented Al-Hakam II by remarking that his period is the  golden age of Al-Andalus for science and knowledge.

Early rule
----------

Dinar of al-Hakam II, 969 AD
Al-Hakam II succeeded to the Caliphate after the death of his father Abd-ar-Rahman III in 961. He secured peace with the Catholic kingdoms of northern Iberia, and made use of the stability to develop agriculture through the construction of irrigation works. Economic development was also encouraged through the widening of streets and the building of markets.

Patron of knowledge
-------------------

Dirham of al-Hakam II
Hakam himself was very well versed in numerous sciences. He would have books purchased from Damascus, Baghdad, Constantinople, Cairo, Mecca, Medina, Kufa, and Basra. His status as a patron of knowledge brought him fame across the Muslim world to the point that even books written in Persia, which was under Arab Abbasid control, were dedicated to him. During his reign, a massive translation effort was undertaken, and many books were translated from Latin and Greek into Arabic. He formed a joint committee of Muwallad Muslims and Mozarab Catholics for this task.

Under Al-Hakam II, promising slave girls were educated according to their aptitudes in calligraphy, astronomy and astrology, medicine, mathematics, and other sciences.

His personal library was of enormous proportions. Some accounts speak of him having more than 600,000 books. The catalogue of library books itself was claimed to be 44 volumes long. Of special importance to Al-Hakam was history, and he himself wrote a history of al-Andalus. Following his death, *Hajib* Almanzor had all "ancient science" books destroyed.
The mathematician Lubna of Córdoba was employed as Al-Hakam's private secretary. She was said to be "thoroughly versed in the exact sciences; her talents were equal to the solution of the most complex geometrical and algebraic problems".

The famous physician, scientist, and surgeon Abu al-Qasim al-Zahrawi (Abulcasis) was also active in Al-Hakam's court during his reign, while the leading figures of the Translation movement during the reign of Hakam were Mu'tazilites and Ibn Masarra.

Construction projects
---------------------

His building works included an expansion of the main mosque of Córdoba (962–966), the Mezquita, and the completion of the royal residence Medina Azahara (976), which his father had begun in 936.

Military conquests
------------------

Notable generals who served under Caliph Al-Hakam II were Ghalib ibn Abd al-Rahman and Al-Mansur.

In the early part of his reign, Caliph Al-Hakam II successfully waged war against the Christian kings, Sancho I of León and Castile and García of Navarre. His naval forces defeated Norman sea raiders and seized Tangier from the Idrisids, thereby annexing Morocco to the Caliphate. The Fatimids were defeated in Morocco in 974. The Idrisids were expelled from their territories and Al-Hasan ibn al-Qasim Jannun (the last Idrisid ruler), along with many other Idrisids or their sons, were taken as hostages to Córdoba.

Private life
------------

Al-Hakam married Subh of Córdoba, a Basque concubine.