The Red Fort was built by Mughal Emperor Shah Jahan between 1638 and 1648 when he decided to shift his capital from Agra to Delhi. The fort served as the main residence of the Mughal emperors for nearly 200 years and is an iconic symbol of Mughal architecture.