History of Delhi
The earliest reference to a settlement at Delhi is found in the epic Mahabharata which mentions a city called Indraprastha, built about 1400 BC under the direction of Yudhisthira, A Pandava king, on a huge mound somewhere between the sites where the historic Old Fort and Humayun's Tomb were later to be located. Although nothing remains of indraprastha, according to legend it was a thriving city. The first reference to the place-name Delhi, as already mentioned, seems to have been made in the 1st century BC, when Raja Dhilu built a city near the site of the future Qutb Minar and named it for himself. Thereafter Delhi faced many vicissitudes and did not reemerge into prominence until the 12th century AD, when it became the capital of the Cauhan ruler Prthviraja III. After thew defeat of the Prthviraja in the late 12th century, the city passed into Muslim hands. Qutb-ud-Din Aybak, founder of the Mu'izzi dynasty and builder of the famous tower Qutb Minar, also chose Delhi as his capital.
Ala`-ud-Din Khalji built the second sity of Delhi at Siri, three miles
northeast of the Qutb Minar. The third city of Delhi was built by Ghivas-ud-din
Tughluq at Tughlakabad but had to be abandoned in favour of the old site
near the Qutb Minar because of a scarcity of water. his successor, Muhammad
ibn Tughluq, estended the city farther northeast and built new fortifications
around it. It then became the fourth city of Delhi, under the name Jahanpanah.
These new settlements were located between the old cities near the Qutb
Minar and Siri Fort. Muhammad ibn Tughluq's successor, Firuz Shah Tughluq,
abandoned this site altogether and in 1354 moved his capital farther north
near the ancient site of Indaprastha and founded the fifth city of Delhi,
Firuzabad, which was situated in what is now the Firoz Shah Kotla area.
After the invasion and sack of Delhi by Timur at the end of the 14th century, the last of the sultan kings moved the capital to Agra, so that Delhi expeienced a temporary diminution in its importance. Babur, the first Mughal ruler, reestablished Delhi as the seat of his empire in 1526. His son Humayun built a new city, Din Panah, on the site between Firoz Shah Kotla and the Purana Qal'ah. Sher Shah, who overthrew Humayun in 1540, razed Din Panah to the ground and built his new capital, the Sher Shahi, as the sixth city of Delhi.
Delhi later lost importance when the Mughal emperors Akbar and Jahangir
moved their headquarters, respectively, to Fatehpur Sikri and Agra, but
the city was restored to its former glory and prestige in 1638, when Shah
Jahan, Akbar's grandson, laid the foundation of the seventh city of Delhi,
Shahjahanabad, which has come to be known as Old Delhi. The greater part
of the city is still confined within the space of Shah Jahan's walls, and
several gates built during his rule-the Kashiri Gate, the Delhi Gate, the
Turkman Gate, and the Ajmeri Gate-still stand. (Brittanica)