This is the Burmalı Minare Camii (Spiral Minaret Mosque), built between 1237-1247 by the Selcuks.
The mosque was severely damaged in 1590 (by earthquake) and in 1602 (by fire), but rebuilt before 1640, when the Turkish writer/traveller Evliya Çelebi saw and described it. Although the main building and the adjacent türbe are of Seljuk origin, the minaret is not. It is thought to date from the 17th century restoration; it resembles the spiral minarets of the Afyon Gedik Ahmet Paşa Camii and the Edirne Üç Şerefeli Cami (both 15th century Ottoman).