Guru Ramdas Ji, fourth guru of Sikh faith, in the year 1577 AD, founded the city of Amritsar. He encouraged people of all professions to take up residence here. The town expanded further under his son and successor, Guru Arjan Dev Ji, who completed the construction of the holy shrine with Harimandar in the middle surrounded by a lined tank now famous as the Golden Temple.
With the installation of the Granth Sahib, on 16 August 1604, in the Harimandar, the shrine surrounded by the sacred pool (known as sarovar), together became the central attraction of the town and a site of pilgrimage for Sikhs from far and near. With the development of Guru Bazaar, the city expanded further. Guru Hargobind Ji, (1595-1644), the Sixth guru of Sikh faith constructed the Akal Takht (Throne Eternal) near the pool and opposite to the Harimandar, where he sat in state, dispensing the secular business of the community.
In the third decade of the 19th century, Maharaja Ranjit Singh started the construction of a wall around the city to improve its fortifications as well as to mark his unshared sway over the city, which had come to serve as his second capital. It was completed finally at the cost of over 12 lacs of Rupees and had 12 Gates and bridges leading to the City. The twelve gates (darwazas) are named as follows: Lahori, Khazana, Hakiman, Gilwali, Ramgarhia (now known as Chatiwind), Ahluwalia (now known as Sultanwind), Doburji (now known as Ghee Mandi), Deorhi-i-Kalan (now known as Mahan Singh Gate), Ram Bagh, Shahzada, Darwaza-i-Rangar Nanglian (now known as Bhagtanwala Gate), Darwaza-i-Shahzada (now known as Hathi Gate) and Lohgarh.