The Walled City of Lahore, also call the Mud City (Kacha Kot) owing to the original building material of the walls, has its origin in the ancient history of India. The original building of Lahore may have taken place 4,000 years ago, in 2000 B.C.E. Situated in northern India, that would have made the ancient city of Lahore contemporaneous with the Indus Valley Civilization that lay on the northwestern coast of India and Pakistan. The Walled City of Lahore had been in existence long before the most famous of its occupiers, the Mughals, arrived. It had existed well before Buddha's birth, and had been standing throughout the development of Hinduism and Jainism. As a walled city close to the beginnings of Buddhism, most likely Buddhism played in the history of ancient Lahore.
The greatest impact on the Walled City of Lahore's architecture came with the invasion of the Mongols, or Mughals, the Persian name for the Mongols. The Mongol's swept into India regularly during their rise between the thirteenth through the seventeenth centuries. The Mongol invaders brought merely destruction before the arrival of the five great Mughal leaders: Barbur, Humayun, Akbar, Jahangir, and Shah Jahan. They established the Mughal reputation as some of the foremost royal architects and builders in world history. The Walled City of Lahore displayed their artistic talents.
Akbar's reign saw the most extensive building of the walled city. The city became distinguished by its gates, mosques, and palaces. Each of the thirteen gates (Akbari Gate, Bhati Gate, Delhi Gate, Kashmiri Gate, Lohari Gate, Masti Gate, Mochi Gate, Mori Gate, Roshnai Gate, Shahalmi Gate, Shairanwala Gate, Taxali Gate, and Yakki Gate) served a purpose, as with most ancient cities. The British sealed shut all gates but one, the Roshnai Gate, to enhance security. Since independence from the British in 1947, six gates have been rebuilt. Two major mosques have been built in the Walled City. The most famous mosque, the Badshahi Mosque, had been built by Aurangzeb, the son of Shah Jahan. Aurangzeb had modeled the mosque on his master builder father's Jama Masjid in Delhi.
Since India's independence from Great Britain, and the establishment of Pakistan at the same time, the Walled City of Lahore has been within Pakistan's borders. Yet the Walled City of Lahore has a heritage shared by Pakistan, Bangladesh, and India.