In 1501 Sultan Sikander Lodi established his capital here, but the city fell into Mughal hands in 1526, when Emperor Babur defeated the last Lodi sultan at Panipat, 90km north of Delhi, to found the Mughal dynasty. Agra reached the peak of its magnificence between the mid-16th and mid-17th centuries as the capital of the Mughal empire during the reigns of Akbar, Jehangir and Shah Jahan. During this period, the fort, the Taj Mahal and other major mausoleums were built. In 1638 Shah Jahan built a new city in Delhi, and his son Aurangzeb moved the capital there 10 years later.

In 1761 Agra fell to the Jats, a warrior class who looted its monuments, including the Taj Mahal. The Marathas took over in 1770, but were replaced by the British in 1803. Following the First War of Independence (Indian Uprising) in 1857, the British shifted the administration of the province to Allahabad (now Prayagraj). Deprived of its administrative role, Agra developed as a centre for heavy industry, quickly becoming famous for its chemicals industry and air pollution, before the Taj and tourism became a major source of income.