In 1831, in the eastern part of Ichan-Kala was created a large market area by the order of Khiva’s Khan. Here was erected a shopping arcade selling grains, fruits, soaps, and candles. There were also a series of small trading houses and in the adjacent site as well as a place of the slave trade. Due to the development of trade relations with Bukhara, Iran and especially with Russia Alla Kuli Khan started in the place construction of the caravanserai.
The caravanserai, designed during the reign of Allakuli Khan in 1832 – 1833 architecturally close to the majestic madrasah. The foreign merchants can stay here, store and sell their goods in. The building also had a special entrance for pack animals. The caravanserai, however, had to be fit into Ichan-Kala, so they destroyed the part of the town wall at the palace and set the building with its side part in Ichan-Kala and its facade facing the bazaar square outside it. Later they attached a roofed bazaar to the facade entrance of the caravanserai.