<P> Agra Fort is a historical fort in the city of Agra in India . It was the main residence of the emperors of the Mughal Dynasty till 1638, when the capital was shifted from Agra to Delhi . The Agra fort is a UNESCO World Heritage site . It is about 2.5 km northwest of its more famous sister monument, the Taj Mahal . The fort can be more accurately described as a walled city . </P> <P> After the First Battle of Panipat in 1526, the Babur stayed in the fort, in the palace of Ibrahim Lodi . He later built a baoli (step well) in it . His successor, Humayun, was crowned in the fort in 1530 . He was defeated at Bilgram in 1540 by Sher Shah Suri . The fort remained with the Suris till 1555, when Humayun recaptured it . Adil Shah Suri's general, Hemu, recaptured Agra in 1556 and pursued its fleeing governor to Delhi where he met the Mughals in the Battle of Tughlaqabad . </P> <P> Realising the importance of its central situation, Akbar made it his capital and arrived in Agra in 1558 . His historian, Abul Fazl, recorded that this was a brick fort known as' Badalgarh' . It was in a ruined condition and Akbar had it rebuilt with red sandstone from Barauli area Dhaulpur district, in Rajasthan . Architects laid the foundation and it was built with bricks in the inner core with sandstone on external surfaces . Some 4,000 builders worked on it daily for eight years, completing it in 1573 . </P> <P> It was only during the reign of Akbar's grandson, Shah Jahan, that the site took on its current state . Shah Jahan built the beautiful Taj Mahal in the memory of his wife, Mumtaz Mahal . Unlike his grandfather, Shah Jahan tended to have buildings made from white marble . He destroyed some of the earlier buildings inside the fort to make his own . </P>

Who built the famous agra fort at agra