The area around Delhi was probably inhabited before the second millennium BCE and there is evidence of continuous inhabitation since at least the 6th century BCE. Through most of its history, Delhi has served as a capital of various kingdoms and empires. It has been captured, ransacked and rebuilt several times, particularly during the medieval period, and modern Delhi is a cluster of a number of cities spread across the metropolitan region.
The earliest architectural relics date back to the Maurya period (c. 300 BCE); in 1966, an inscription of the Mauryan Emperor Ashoka (273–235 BCE) was discovered near Srinivaspuri. Remains of eight major cities have been discovered in Delhi. The first five cities were in the southern part of present-day Delhi.
During the Indian Rebellion of 1857, Delhi fell to the forces of East India Company after a bloody fight known as the Siege of Delhi. The city came under the direct control of the British Government in 1858.