In 1806, a long gallery of trading rooms covered by domes was added to the Palvan-Darvaza Gate in Khiva – Allakulikhan Caravanserai. At this gate, which closed the busiest street, the commercial life of the city was concentrated during the Allakulikhan period (1825-1842).
In the XIX century in connection with the expansion of economic links with Bukhara, Persia and Russia, Khiva needs new trading areas. In 1832 – 1833, a huge caravanserai was built here by order of Allakulikhan. To place it, the wall of Ichan-Qala near the Tash-khuli Palace had to be demolished.
The caravanserai was intended for stopping merchants, storing goods and trading. It consisted of a large courtyard and two-storey hujshras. The caravanserai building has a rectangular shape extending from south to north.
The Allakulikhan Caravanserai in Khiva is built like a madrasa and has 105 rooms. The living quarters were on the second floor, while the storerooms and stalls were on the first floor. This is the only surviving caravanserai in Khorezm.
In terms of architecture, the Allakulikhan caravanserai is very close to a typical madrasa composition. However, the central corridor is directly connected to the courtyard. There are two floors of hujras around the courtyard.
There is a covered market in Khiva – directly in front of the Allakulikhan Caravanserai – which runs along the façade. The dimensions of the structure are 69 x 58 metres, 46.3 x 42.4 metres. Thus, trade, storage of goods and accommodation for merchants were concentrated in one place.
The covered bazaar consists of two large domed rooms, alternating and partially surrounded by 14 smaller domed rooms, rising in a spiral on strong brick pillars and connected by sixteen through arches.
Large arched doors lead from the east and west into the covered bazaar. In its construction and purpose it resembles the Abdullah Khan Palace in the city of Bukhara.
In the middle of the northern wall of the covered bazaar is a third gate leading to the saray – the only “real” caravanserai in the whole vast area of the former Khiva Khanate.
Its spacious, square courtyard is surrounded by a brick wall, along which 105 hujshras are arranged. These hujras served as stopovers for visiting silk merchants and for storing raw silk and silk products.
A customs office was located in the gate hujras to collect duties from the silk trade. The shed and covered bazaar, as mentioned in the description of the Allakulikhan madrasa, was a waqf of the city library.
According to the waqf document preserved in the Khiva Museum, the income from the waqf was to be spent mainly on buying books and keeping the library.