Agra has a rich history, seen in the monuments around the city. Though the heritage of Agra city is linked with the Mughal dynasty, many 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.