Agra has a rich historical background, which is amply evident from the numerous historical monuments in and around the city. The earliest reference for Agra comes from the epical age, when Mahabharata refer Agra as Agravana. In the sources prior to this, Agra has been referred as Arya Griha or the abode of the Aryans. The first person who referred Agra by its modern name was Ptolemy.
Agra came to its own when Shahjahan ascended to the throne of Mughal Empire. He marked the zenith of Mughal architecture, when he built the Taj in memory of his beloved wife Mumtaz Mahal. In his later years, Shahjahan shifted his capital to the new city of Shahjahanabad in Delhi and ruled from there. Shahjahan was dethroned in 1658 by his son, Aurangzeb who imprisoned him in the Agra Fort. Aurangzeb shifted the capital back to Agra till his death. After the death of Aurangzeb, Mughal Empire could not touch its peak and many regional kingdoms emerged. The post-Mughal era of Agra saw the rule of the Jats, Marathas and finally the British taking over the city.
Agra is the city of the inimitable Taj Mahal. The story of Agra beigns much earlier then the Taj, However it finds mention in the epic Mahabharata when it was called Agrabana are Paradise. Ptolemy, the famous second century A.D. geographer, marked it on his map of the world as Agra. Tradition and legend ascribe the present city of Raja Badal Singh (around 1475 A.D.) whose Fort, Badalgarh, Stood on or near the site of the present Fort. However, the 12th century A.D. persian poet Salman, too, Speaks of a desperate assault on the forrtress of Agra, then held by one King Jaipal, by sultan Mahmud of Ghazni. It was Mughals who finally nurtured Agra with the finest monuments architects could design : The Taj Mahal of Shah Jhan, Agra Fort of Akbar, Itmad-Ud-Daulah and neighbouring Sikandra are but few of the many that spangle the city, each of which stands in mute testimony to the city's grandur over the ages.
Though the heritage of Agra city is linked with the Mughal dynasty, numerous other rulers also contributed to the rich past of this city. Modern Agra was founded by Sikandar Lodhi (Lodhi dynasty; Delhi Sultanate) in the 16th century. Babar (founder of the Mughal dynasty) also stayed for sometime in Agra and introduced the concept of square Persian-styled gardens here. Emperor Akbar built the Agra fort and Fatehpur Sikri near Agra. Fatehpur Sikri remained his capital for around fifteen years after which the city was left isolated in mysterious circumstances. Jahangir beautified Agra with palaces and gardens despite spending most of his time in Kashmir with which he was passionately attached.