| In the Abbasid Empire, scholars translated many foreign works into Arabic and Persian , built large libraries, and welcomed scholars persecuted by the Byzantine Empire. There was an imperial library in Ctesiphon, and works were also translated at the Academy of Gundishapur. During the Islamic conquest of Persia. In 750, the Abbasid dynasty replaced the Umayyad dynasty as head of the Islamic empire, and in 762, the caliph al-Mansur (reigned 754 - 775) built Baghdad and made it his capital (the previous capital being Damascus). The Abbasid dynasty had a strong Persian bent, and adopted many practices from the Sassanid empire - among those, that of translating foreign works, except that now works were translated into Arabic. For this purpose, al-Mansur founded a palace library, modeled after the Sassanid Imperial Library. The House of Wisdom was originally concerned with translating and preserving Persian works, first from Pahlavi (Middle Persian), then from Syriac and eventually Greek. Works on astrology, mathematics, agriculture, medicine, and philosophy were thus translated. The Barmakids were influential in the ensuing movement of restoring and preserving Persian culture. They are also credited with the founding of the first paper mill in Baghdad. The secret of papermaking had been obtained from Chinese prisoners taken at the Battle of Talas (751). Previously, copyists would used papyrus (which is fragile) or parchment (which is expensive). The introduction of paper thus facilitated the multiplication of books and libraries. Under the sponsorship of caliph al-Ma'mun (reigned 813 - 833), it seems that the House of Wisdom took on new functions related to mathematics and astrology. The focus also shifted from Persian to Greek science. At that time, the library was directed by the poet and astrologer Sahl ibn-Harun (d. 830); the other scholars associated with the library are Mohammed ibn Musa al-Khwarizmi (780 - 850), the Bana Musa brothers (Mohammed Jafar ibn Musa, Ahmad ibn Musa, and al-Hasan ibn Musa), and Yaqub ibn Ishaq al-Kindi (801 - 873). Hunayn ibn Ishaq (809 - 873) was placed in charge of the translation work by the caliph. The most renowned translator was the Sabian Thabit ibn Qurra (826 - 901). Translations of this era were superior to earlier ones, however, soon after, the emphasis on translation work declined, as new ideas became more important. The House of Wisdom flourished under al-Ma'mun's successors al-Mu'tasim (reign 833 - 842) and al-Wathiq (reign 842 - 847), but declined under the reign of al-Mutawakkil (reign 847 - 861), mainly because Ma'mun, Mu'tasim, and Wathiq followed the sect of Mu'tazili, while al-Mutawakkil followed orthodox Islam. He wanted to stop the spread of Greek philosophy which was one of the main tools in Mu'tazili theology.