With the arrival of the Seljuq Turks in the late 11th century, Damascus again became the capital of independent states. It was ruled by Abu Sa'id Taj ad-Dawla Tutush I starting in 1079 and he was succeeded by his son Abu Nasr Duqaq in 1095. The Seljuqs established a court in Damascus and a systematic reversal of Shia inroads in the city. The city also saw an expansion of religious life through private endowments financing religious institutions (''madrasas'') and hospitals (''maristans''). Damascus soon became one of the most important centers of propagating Islamic thought in the Muslim world. After Duqaq's death in 1104, his mentor (''atabeg''), Toghtekin, took control of Damascus and the Burid line of the Seljuq dynasty. Under Duqaq and Toghtekin, Damascus experienced stability, elevated status and a revived role in commerce. In addition, the city's Sunni majority enjoyed being a part of the larger Sunni framework effectively governed by various Turkic dynasties who in turn were under the moral authority of the Baghdad-based Abbasids.