The rapid development of trade in the Middle Ages saw many new caravanserais (an inn for travelers with a central courtyard) being built throughout Azerbaijan. Caravanserais were generally built along the same lines as castles - with a huge gate that made them impregnable to invaders. Construction of the Sheki caravanserai, which covers 8,000 sq meters, began in the 18th century. It is built in two parts: Yukhary and Ashaghy, which means upper and lower respectively. The front of the building, which overlooks the street, is 14 meters high.