It was in about 1229 that Sultan Alaeddin Keykubad I had this huge caravanserai built on the main route between the capital Konya and the trade and administrative center of Kayseri to the east. The 121m/132yds long fortified complex, strengthened by its 24 marble towers, covers an area of 4,866sq.m/52,377sq.ft. In 1254 the caravanserai was badly damaged by fire, being restored between 1276 and 1278 by Keyhusrev III, then a puppet of the Mongol governor (Perwâne). More repairs were needed in the early 14th century during the reign of the Seljuk Sultan Ma'sud of Rum.
The complex is entered through an impressive marble gateway, 13m/43ft high and 11m/36ft wide, richly decorated with ornate designs (tendrils, whicker, rosettes,
stalactites and arabesques). An inscription above the gate warns those who enter that "Allah is almighty". The thick walls filled with layers of mortar and rubble are typical of Early Seljuk ashlar building. The summer court, in the center of which stands a pavilion mosque with twin staircases, measures 51m/167ft x 24m/79ft, not including the surrounding living quarters and arcades. The nine-bay winter hall with its magnificent, highly ornate portal and open octagonal drum with tent-roof over the central bay, measures 55m/180ft x 37m/121ft.
The reason for building so many of these halts in the steppe regions of Anatolia was that, once away from areas of settlement, the wealthy merchants and their caravans on the long distance trade routes ran the gauntlet of predatory nomads. The caravanserais were therefore mostly bastion-like in design and equipped with a stout entrance gate which could be firmly secured. They were very much more than just temporary shelters for the night, with stabling, guest rooms, mosques, cooking facilities and baths; they were also self-contained settlements with a population of watchmen/guards, craftsmen (smiths, saddlers), grooms, laborers, butchers, bakers, cooks and kitchen staff, doctors and others. At the same time they were depots for merchandise and had their own marts with little shops. Travelers were allowed to stay for three days without charge. The cost of maintaining these hostelries was in part borne by the sultan in the interests of encouraging trade and in part, under the Seljuks, by levying an annual tax on every merchant and craftsman in the empire.