After the fall of the Seljuks, Viranşehir was renamed for a time as Süleymanşehir in honor of one of the beys of the region's ruling dynasty, the Eshrefids, who made the town into his capital. Since the beys of Eshrefids resided here, the present name of Beyşehir was gradually adopted for the town. The Great Mosque of Beyşehir built by the dynasty between 1296–1299, also called Eşrefoğlu Mosque, is considered one of the masterpieces of the intermediate period of Anatolian beyliks between the Seljuk and Ottoman architecture styles.