Agra served as the primary capital for three great Mughal emperors: Akbar (who made it his capital in 1556 and built the Agra Fort), Jahangir (who ruled from Agra), and Shah Jahan (who was born in Agra and later commissioned the Taj Mahal there). The city remained the Mughal capital until Shah Jahan shifted it to Delhi in 1648.