Its semi-circular plan curves inland, with the straight side running along the river. The emperor Akbar rebuilt an older ruined brick fort, known as Badalgarh, in red sandstone from Dhaulpur between 1565 and 1573, and the fort remained the main residence of the Mughal rulers until 1638, when Shah Jahan moved the capital to Shahjahanabad in Delhi. It was listed as a UNESCO World Heritage Site in 1983 for its importance in the Mughal period.
A fort stood here long before the Mughals: it was taken in a Ghaznavid raid in the late 11th century, and the Lodi sultans made Agra their capital and held the fort until Ibrahim Lodi fell at the First Battle of Panipat in 1526. Humayun was crowned here in 1530. Akbar's grandson Shah Jahan, who built the Taj Mahal, replaced much of the red sandstone palace with white marble halls after 1628. His son Aurangzeb later kept him a prisoner in the fort from 1658 until his death in 1666, and in 1666 the Maratha leader Shivaji, slighted at Aurangzeb's court in the Diwan-i-Khas, was held in the fort and escaped. Jats, Mughals and Marathas fought over it in the 18th century before the British took it in 1803. Of the roughly 500 buildings Abul Fazl counted under Akbar, fewer than 30 Mughal structures are left, most of them on the south-eastern side facing the river; the British cleared much of the rest for barracks.
Two great gateways survive. The Delhi Gate on the west, built around 1568 as the formal public entrance, is decorated with white marble inlay and leads to an inner gate, the Hathi Pol, flanked by two life-size stone elephants with riders; a drawbridge over the moat, a slight climb and a right-angle turn between the gates kept attacking elephants from building up speed. The northern part of the fort, including the Delhi Gate, is in use by the Indian Army and closed to the public. The southern entrance pairs Akbar's inner Akbari Gate with the outer Amar Singh Gate, added under Aurangzeb and popularly named after the Rajput noble Amar Singh Rathore.
Akbar's main surviving palace is the Jahangiri Mahal, the largest residence in the fort, built of red sandstone for the women of the court with carved brackets and arches that combine Hindu and Islamic forms around a courtyard with an octagonal marble cistern. In front of it stands Jahangir's Hauz, a bath carved from a single stone in 1611 and inscribed in Persian. Next door, Shah Jahan coated the sandstone Shah Jahani Mahal in white stucco painted with flowers so that it looked like marble. Further along the river, the marble Khas Mahal, home to his daughters Jahanara and Roshanara, has gilded ceilings and pavilions roofed in curved Bengal style, and faces the Anguri Bagh, or Grape Garden, a charbagh divided into four by paved paths.
The Diwan-i-Am, the Hall of Public Audience, was the first building Shah Jahan commissioned here, in 1628: a pillared hall of red sandstone plastered with shell-lime stucco to look like marble, with a marble canopy for the throne set in its eastern wall, from which screened windows let the court women watch. The Diwan-i-Khas, the Hall of Private Audience, completed around 1637, has finely carved marble pillars set with flowers of semi-precious stone, and looks out over a riverside terrace that once held a white and a black throne. North of the Diwan-i-Am, the Moti Masjid or Pearl Mosque, finished in 1653, is a plain white marble mosque standing on a raised plinth.
The octagonal Musamman Burj, set on the fort's largest bastion facing the river, is where emperors showed themselves to their subjects each day from a jharokha balcony. Shah Jahan rebuilt it in marble inlaid with creeper and flower designs, and it is here that he is said to have died looking out at the Taj Mahal. Below the Diwan-i-Khas, the Shish Mahal was a royal bathing room whose walls and ceilings are covered in tiny pieces of mirror glass. The fort also keeps the Ghaznin Gate, a carved deodar door the British brought from the tomb of Mahmud of Ghazni in 1842, claiming wrongly that it was a gate taken from the Somnath temple.




