It is a 17th century fort complex constructed by the Mughal emperor, Shah Jahan in the walled city of Old Delhi that served as the residence of the Mughal Emperors. The fort was the palace for Mughal Emperor Shah Jahan's new capital, Shahjahanabad, the seventh city in the Delhi site. He moved his capital here from Agra in a move designed to bring prestige to his reign, and to provide ample opportunity to apply his ambitious building schemes and interests. It served as the capital of the Mughals until 1857, when Mughal emperor Bahadur Shah Zafar was exiled by the British Indian government. The fort lies along the Yamuna River, which fed the moats that surround most of the walls.