Human habitation was probably present in and around Delhi during the second millennium BCE and before, as evidenced by archeological relics. The city is believed to be the site of Indraprastha, capital of the Pandavas in the Indian epic Mahabharata. Settlements grew from the time of the Mauryan Empire (c. 300 BC). Remains of seven major cities have been discovered in Delhi. The Tomara Rajput dynasty founded the city of Lal Kot in 736 AD. The Chauhan Rajput kings of Ajmer conquered Lal Kot in 1180 AD and renamed it Qila Rai Pithora. The Chauhan king Prithviraj III was defeated in 1192 by the Afghan Muhammad Ghori. In 1206, Qutb-ud-din Aybak, the first ruler of the Slave Dynasty established the Delhi Sultanate. Qutb-ud-din started the construction the Qutub Minar and Quwwat-al-Islam (might of Islam), the earliest extant mosque in India. After the fall of the Slave dynasty, a succession of Turkic and Central Asian dynasties, the Khilji dynasty, the Tughluq dynasty, the Sayyid dynasty and the Lodhi dynasty held power in the late medieval period, and built a sequence of forts and townships that are part of the seven cities of Delhi. Delhi was a major center of Sufism (a mystic tradition of Islam) during the Sultanate period. In 1526, Zahiruddin Babur defeated the last Lodhi sultan in the First Battle of Panipat and founded the Mughal Empire that ruled from Delhi, Agra and Lahore.
The Mughal Empire ruled northern India for more than three centuries, with a five-year hiatus during Sher Shah Suri’s reign in the mid-16th century. Mughal emperor Akbar shifted the capital from Delhi to Agra. Shah Jahan built the seventh city of Delhi that bears his name (Shahjahanabad), and is more commonly known as the old city or old Delhi. The old city served as the capital of the Mughal Empire since 1638. In 1761, Delhi was raided by Ahmed Shah Abdali after the Third battle of Panipat.
Delhi came under direct British control after the Indian Rebellion of 1857. Shortly after the Rebellion, Calcutta was declared the capital of British India and Delhi was made a district province of the Punjab. In 1911, Delhi was again declared as the capital of British India. Parts of the old city were pulled down to create New Delhi; a monumental new quarter of the city designed by the British architect Edwin Lutyens to house the government buildings. New Delhi, also known as Lutyens’ Delhi, was officially declared as the seat of the Government of India and the capital of the republic after independence on 15 August 1947. During the partition of India thousands of Hindu and Sikh refugees from West Punjab and Sindh migrated to Delhi. Migration to Delhi from the rest of India continues, contributing more to the rise of Delhi’s population than the birth rate, which is declining.
In 1984, the assassination of Indira Gandhi (then Prime Minister of India) led to violent backlash against the Sikh community, resulting in over two thousand seven hundred deaths. The Constitution (Sixty-ninth Amendment) Act, 1991 declared the Union Territory of Delhi to be formally known as National Capital Territory of Delhi. The Act gave Delhi its own legislative assembly, though with limited