The Agra Fort was built by the Mughal Emperor Akbar between 1565 and 1573 as a military stronghold. Humayun ruled earlier, Jehangir (Akbar's son) ruled after Akbar, and Shah Jahan (Jehangir's son) later added structures but didn't build the original fort.