In ancient Iran, the squares of the cities were established near the governorships and were places for gatherings and ceremonies. The Ganjali square - behind the door - is ninety-nine meters by fifty-four meter, and similar to Naqsh-e Jahan Square in Isfahan and Mir Chakhmagh Square in Yazd, is surrounded by urban elements such as bazaars, Caravanserais and schools.
The Ganjali Khan Complex (Persian: مجموعه گنجعلیخان - Majmou-e-yeh Ganjali Khan) is a Safavid-era complex, located in the old center of city of Kerman, Iran. The complex is composed of a school, a square, a caravanserai, a bathhouse, an Ab Anbar (water reservoir), a mint, a mosque and a bazaar. The Ganjali Khan Complex was built by Ganjali Khan who governed Kerman, Sistan and Kandahar provinces from 1596 to 1621 under Safavid Shah Abbas I. A number of inscriptions laid inside the complex indicate the exact date when these places have been built. The architect of the complex was Mohammad Soltani from Yazd. The complex covers an area of 11000 square meters and is centered on a large public square—ninety-nine meters by fifty-four meter—which is aligned with Vakil Bazaar running east-west to its south. The square is enveloped by bazaar arcades to the north, south and west and is flanked by the Ganjali Caravanserai to the east. The entrance to the Ganjali bathhouse is located along a section of Vakil Bazaar south of the square, known as Ganjali Khan Bazaar. The complex was built in Isfahani style of architecture.
Kerman was founded as a defensive outpost, with the name Behdesīr, by Ardeshir I, founder of the Sassanid Empire, in the 3rd century AD. After the Battle of Nahāvand in 642, the city came under Muslim rule. At first the city's isolation allowed Kharijites and Zoroastrians to thrive there, but the Kharijites were wiped out in 698, and the population was mostly Muslim by 725. Already in the eighth century the city was famous for its manufacture of cashmere wool shawls and other textiles. The Abbasid Caliphate's authority over the region was weak, and power passed in the tenth century to the Buyid dynasty, which maintained control even when the region and city fell to Mahmud of Ghazna in the late tenth century. The name Kerman was adopted at some point in the tenth century.
The Masjid gate through which Agha Mohammad Khan entered the city. Kerman was under the Seljuk Turks in the 11th and 12th centuries, but remained virtually independent, conquering Oman and Fars. When Marco Polo visited the city in 1271 it had become a major trade emporium linking the Persian Gulf with Khorasan and Central Asia. Subsequently, however, the city was sacked many times by various invaders. Kerman expanded rapidly during the Safavid Dynasty. Carpets and rugs were exported to England and Germany during this period.
In 1793 Lotf Ali Khan defeated the Qajars and in 1794 captured Kerman. But soon, he was besieged in Kerman for six months by Agha Mohammad Khan. When the city fell to Agha Mohammad Khan, angered by the popular support that Lotf Ali Khan had received, all the male inhabitants were killed or blinded, and a pile was made out of 20,000 detached eyeballs and poured in front of the victorious Agha Muhammad Khan. The women and children were sold into slavery, and the city was destroyed over ninety days. The present city of Kerman was rebuilt in the 19th century to the northwest of the old city, but the city did not recover to its former size until the 20th century.