In 950 Abd al-Rahman received in Córdoba an embassy from count Borrell II of Barcelona, by which the northern county recognized caliphal supremacy in exchange for peace and mutual support. In 958, Sancho, the exiled king of León, King García Sánchez of Pamplona, and his mother Queen Toda all paid homage to Abd al-Rahman in Córdoba. Until 961, the caliphate played an active role in the dynastic strife characterizing the Christian kingdoms during the period. Ordoño III's half-brother and successor, Sancho the Fat, had been deposed by his cousin Ordoño IV. Together with his grandmother Toda of Pamplona, Sancho sought an alliance with Córdoba. In exchange for some castles, Abd al-Rahman helped them to take back Zamora (959) and Oviedo (960) and to overthrow Ordoño IV. Abd al-Rahman was accused of having sunk in his later years into the self-indulgent habits of the harem. He is known to have openly kept a male as well as a female harem. This likely influenced the polemical story of his sexual attraction for a 13-year-old boy (later enshrined as a Christian martyr and canonised as Saint Pelagius of Córdoba) who refused the Caliph's advances. This story of paedophilia may have been a construct on top of an original tale, however, in which he ordered the boy-slave to convert to Islam. Either way, enraged, he had the boy tortured and dismembered, thus contributing to the Christian perception of Muslim brutality. Abd al-Rahman spent the rest of his years in his new palace outside Córdoba. He died 15 October 961 and was succeeded by his son al-Hakam II. Abd al-Rahman was a great humanist and patron of arts, especially architecture. A third of his revenue sufficed for the ordinary expenses of government, a third was hoarded, and a third was spent on buildings. After declaring the caliphate, he had a massive palace complex, known as the Medina Azahara, built some five kilometers north of Córdoba. The Medina Azahara was modeled after the old Umayyad palace in Damascus and served as a symbolic tie between the new caliph and his ancestors. It was said that Córdoba contained 3000 mosques and 100,000 shops and homes during his reign.