The caravanserais appeared on the territory of Turkmenistan long before the appearance of Islam.

In the Middle Ages, on all the routes of the Great Silk Road from the Mediterranean to China, special guesthouses were built to rest and protect merchant caravans at distances of 30-40 kilometers, protected by deep walls and powerful bastions. They were built in a way that the caravan, leaving in the morning one staging post, can reach the next at night. There were even special directories indicating the location of road hotels. Their most common name is the caravanserai. Sometimes they were included in the strengthening of military detachments. Urban buildings of the caravanserais had no use for defense and were placed near the bazaars - at the key points of the cities. 

The caravanserais appeared on the territory of Turkmenistan long before the arrival of Islam. The ruins of the trade fortresses of the Sassanid and possibly Parthian times were preserved: their main function was apparently defensive, but they were already adapted to receiving and servicing merchant caravans. The mass construction of buildings of this type only began in the Muslim era - from the first years of Islamization of Central Asia in the second half of the 7th century. The Arabs began to build military fortresses in the conquered lands, which were called "Rabat", or "Ribat". They housed detachments of soldiers, who were called "gazi" - "fighters for the faith". Later, merchants with their caravans and other travelers began to find resort there, the rabats received an additional function of guesthouses. This led to a mixing of terms, and from the IX th century, the caravanserai often became known as a rabats. By that time the original meaning of the word "Rabat" had already been forgotten. 

In Turkmenistan and neighboring countries, until the XI century, the functions of the caravansarai were often carried out by the traditional Kyoshk residential castle, surrounded by a well-protected courtyard. The most typical type of the guesthouse was formed for this region by the end of the XI century. The planning scheme of these rectangular or square, but all-time symmetrical structures includes the courtyard, surrounded by perimeter rooms for the residents, warehouses, canopies for pack animals and forage.  In addition to the monumental caravansarais, castles-dwellings and border fortresses, which were built in the most diverse parts of Central Asia on large trade routes, were similar in structure to the XI-XII centuries. 

The heyday of the construction of the caravansarai-rabat in Dehistan, Khorasan and Khorezm came in the era of sultans from the dynasty of the Great Seljuks and the Khorezmshahs-Anushteginids who replaced them, in the XI th beginning of the XIII century. There were several thousand according to the testimony of travelers and geographers of that time. Not all of them were, probably, monumental buildings, but those that were built by the state and embodied its prestige surprised the contemporaries with the magnificence of architecture, wealth and comfort. As early as the 8th century, one of the last Umayyad governors of Khorasan, Assad ibn Abdallah, was noted by contemporaries for the construction of caravansarai guesthouses in the steppes: "A stranger comes from the east, comes another from the west, and they do not find any shortage there." 

The construction of large caravanserais on important trade routes was the prerogative of the state government, it was part of the duty of the "ideal" ruler and proved his concern for the prosperity of the country. The good glory of the sultan, khan or emir was directly proportional to the quantity and magnificence of the caravanserais erected by his order: a traveler coming after a tedious journey into a shady and elegant guesthouse surrounded by arcades caravansarai should feel himself a personal guest of the pious ruler who cares about his safety and comfort. That is why the architecture of the large "royal" karavansarais was far from the prudent utilitarianism: these were really "caravan palaces", striking with luxury finishes and sizes, for decoration and equipment of which the state spared no means. Their structure differed little from these palaces. The most striking examples of such structures are the two famous caravan-sarais erected under the Great Seljuks: Diyakhatyn on the way from Amul to Gurganj and Rabati Sharaf on the way from Serakhs to Nishapur. 

Intercity caravanserais were massive fortifications with thick walls and strong gates. In them, except for the rooms where the travelers were resting, there were trading benches and stalls for camels, horses and cattle, workshops, bathhouses. The detachments were here on duty, who defended the caravanserais and their inhabitants from the attacks of the robbers. Large caravanserais were, moreover, trading outlets where goods could be sold or exchanged. In many caravanserais musicians played for the entertainment of the guests. Often it was possible to buy spirits prepared from grapes grown in the hills of Andalusia, Jerez and Champagne, rich selection of Burgundy, Chios, Cypriot and Falern wine - despite the strictness of Islamic morals, merchants from distant countries did not deny themselves this pleasure. The prayer room was arranged for the zealous Muslims from the side of the gate. Some caravanserais had at their disposal small mosques in the courtyard. Services on caravan routes were provided free of charge. Only in the cities, the travelers had to pay for the lodging for the night. 

Traces of ancient tracts well traced for many centuries are well traced in the Karakum Mountains. Through the desert stretched several chains of wells, whose names are partially preserved and on modern maps of Turkmenistan. Especially a lot of them were on the routes from Nisa and Merv to the north and north-east - to Gurganj and Khiva. The best others in this direction are the monumental caravan-shed near the well of Tumshukly-guyy, among the tall, barkhans fortified with saxaul. It is located 150 kilometers from Sultan-kala - Seljuk part of Merv. 

This is a typical monument of that era, entirely built of clay bricks, but with facades, decorated in the form of slender half-columns, closely pressed together. The so-called corrugated walls were the original reception of the architects Merv and Khorezm - nowhere else in Asia can they be met. The exception was only one more unique monument of the XI th-XII th centuries - Rabati-Malik, standing in the desert between Bukhara and Samarkand. 

The corners of the caravanserai near Tumshukly flank round bastions, and one of them is much more powerful than the others. Even today, having lost its upper part, it rises to 10 meters and can be seen from afar. It is nothing else but a signal tower designed to be a guide for caravans. At night, fire was on its summit, helping the caravans not to go astray. All the stations built in the desert were usually supplied with these lighthouses, but in later, when caravan trade had already stopped and these facilities were abandoned, people began to take them for minarets. The popular name Minara was fixed at this caravansarai. 

The 210 km long road between Amul and Merv connected two large oases on the left bank of the Amu Darya and in the delta of the Murgab River. It also passed mainly through the Karakum desert and takyr. There were no alternative routes and there were no notable settlements on this important stretch of the Great Silk Road but there was a sufficient number of caravanserais and smaller stations at the wells for rest and overnight. All of them are now in ruins, the part is completely scattered or buried by sands but the track itself is preserved and can be clearly seen almost along the entire route. 

The South Turkmenistan Archeological Complex Expedition (UTAKE) under the leadership of Academician Mikhail Masson first carried the field archaeological-topographical study along the road and reconnaissance survey of this area out back in 1952-1953. The results of this work are reflected in his fundamental monograph "Medieval trade routes from Merv to Khorezm and Maverannahr." Since then, the monuments have not been visited by experts, and for many years fell out of their sight. The "reopening" of these objects was possible only after 60 years by joint efforts of the National Directorate for the Protection, Study and Restoration of Monuments of History and Culture under the Ministry of Culture of Turkmenistan and the Institute of Archeology of the University College of London (UCL). The precise geographical coordinates of the lost monuments are established, their photographing is conducted, necessary measurements are made. 

The chain of discounts is traced on the terrain in full accordance with the directions of medieval Arab road guides. Among them are the well-known for Arab road builders at-Tahmalaj, with the ruins of a caravansarai, similar to the castle-keshk. It stands in the middle of a vast takyr. This is a square clay building in plan with corrugated facades on a high platform with nine domed rooms on the upper floor. Not far away, on the 5 kilometers distance is the largest caravansarai of the XI th century in Central Asia known as Akcha-kala.
The only entrance was decorated in the form of a monumental portal and the main facade is entirely decorated with semicircular corrugations. Square bastions are on the corners. This comfortable "hotel" has two courtyards. The first, more extensive, is surrounded by two rows of galleries, intended for animals and for goods. There were spacious common rooms of common use on the left and to the right of the entrance. The second courtyard is smaller in size, with vaulted aivans, open galleries and living rooms-hujras behind them. There was also a special prayer room with a mihrab. Most of the numerous rooms and halls had vaulted ceilings. This once-luxurious caravanserai is a completely unique monument for Central Asia. Academician Galina Pugachenkova, who studied in detail the majestic ruins of Akcha-kala, dated it to the XIth century. 

Finally, the caravansarai Dayakhatyn stands out today as the most famous thanks to numerous publications in scientific books and the media.  It is situated far from populated places, in the desert zone on the left bank of the Amu Darya, on the way from Amul to Gurganj. Its architecture in its constructive and style features is a wonderful example of the skill of the architects of the Seljuk era. Dayachatyn has been preserved much better than other similar facilities and now it become the object of restoration work of Turkmen specialists.