Present-day Mumbai was originally made up of seven isles. Artefacts found near Kandivali in northern Mumbai indicate that these islands had been inhabited since the Stone Age. In the 3rd century BCE, they were part of the Maurya empire, ruled by the Buddhist emperor Ashoka. The Hindu rulers of the Silhara dynasty later governed the islands until 1343, when it was annexed by the kingdom of Gujarat. Some of the oldest edifices of the archipelago-the Elephanta Caves and the Walkeshwar temple complex date to this era.
In 1534, the Portuguese appropriated the islands from Bahadur Shah of Gujarat. They were ceded to Charles II of England in 1661 as dowry or, more appropriately, wedding gifts of Catherine de Braganza. They in turn were leased to the British East India Company in 1668 for a sum of £10 per annum. The company found the deep harbour at Bombay eminently apposite, and the population rose from 10,000 in 1661 to 60,000 by 1675. In 1687, the East India Company transferred their headquarters from Surat to Bombay.
From 1817 the city was reshaped, with large civil engineering projects aimed at merging the islands into a single amalgamated mass. This project, the Hornby Vellard, was completed by 1845 and resulted in the area swelling to 438 km². Eight years later, in 1853, India's first railway line was established, connecting Bombay to Thana. During the American Civil War, (1861-1865) the city became the world's chief cotton market, resulting in a boom in the economy and subsequently in the city's stature. The opening of the Suez Canal in 1869 transformed Bombay into one of the largest Arabian Sea ports.
The city grew into a major urban centre over the next thirty years, owing to an improvement in the infrastructure and the construction of many of the city's institutions. The population of the city swelled to one million by 1906, making it the second largest in India, after Calcutta. It later became a major base for the Indian independence movement, with the Quit India Movement called by Mahatma Gandhi in 1942 being its most rubric event. After independence, the city incorporated parts of the island of Salsette, expanding to its present day limits in 1957. It became the capital of the new linguistic state of Maharashtra in 1960.
In the late 1970s Bombay witnessed a construction boom, with a significant increase in population owing to the influx of migrants. By 1986 it had overtaken Calcutta as the most populated Indian city. The city's secular fabric was torn in 1992, after large-scale Hindu-Muslim riots caused extensive losses to life and property. A few months later, on March 12, simultaneous bombings of the city's establishments by the underworld killed around three hundred. In 1995, the city was renamed Mumbai after the right wing Shiv Sena party came into power in Maharashtra, in keeping with their policy of renaming colonial institutions after historic local appellations.