In 750 Abu al-Abbas destroyed the Umayyads and founded the Abbasid dynasty; al-Mansur built Baghdad in 762, and under Harun al-Rashid (786-809) and al-Ma'mun (813-833) the realm stood at its height: the House of Wisdom translated the Greek classics, and al-Khwarizmi's algebra, Ibn Sina's medicine and al-Razi's chemistry made the Islamic Golden Age; papermaking passed westward through its lands. From the 9th century the Turkic guard ruled in fact and the provinces made themselves free - Tahirids, Saffarids, Tulunids, the Umayyads of Spain, the Fatimids of Egypt - the caliph a figurehead; the Buyids (945) and then the Seljuks (1055) held him in tutelage. In 1258 Hulegu stormed Baghdad and killed the last caliph; the Mamluks of Cairo set up a puppet to carry the name.