Esrefogullari principality was a Turkish principality founded within the environs of Beysehir and Seydisehir in the second half of the 13th century. Seyfeddîn Süleyman b. Esref who was the founder of the principality was a forefront bey of Turkey Seljuk State. Seljuk Sultan Gıyâseddîn Keyhüsrev III was killed by the sultan of the Ilhanli State in the year of 1284 and he was replaced by Gıyâseddîn Mes’ûd II.

The mother of the sultan that was killed asked for help from Esrefogullari principality for his two grandchildren and he invited them to Konya. Esrefoglu was entitled with the regency of the sultanate. He was enthroned on the date of 13th May 1285. But after one month, the Seljuk army arrived and the members of the Esrefogullari principality had to retreat to the region of Beysehir again. Then, Esrefogullari principality had made peace with Sultan Gıyâseddîn Mes’ûd II and they went to Konya and declared their submission and obedience. Meanwhile, the capital city of the principality had become Beysehir.

Esrefoğlu Mehmed Bey was among those who had submitted to the domination of Emir Coban who was an Ilhanli governor (1314). In the period of Suleymân-shah II who had become emir after Mehmed Bey, the Mongolian governor Timurtas set in motion against the principalities that tried to preserve their independence in the forefront places. Timurtas had captured and despoiled the city of Beysehir, and he had killed Suleyman-shah II through throwing him into the lake of Beysehir (1326). Therefore, Esrefogullari principality was abolished.

Among the arhitectural works built in the period of Esrefogullari principality, the mosque and the niche of the mosque built in Beysehir by Seyfeddin Bey are of great beauty and they constitute the continuation of the Seljuk architecture.