Built in the 1100s by Saladin, the massive Citadel of Cairo was the seat of government and residence of the various rulers in Egypt for centuries all the way until the 1800s.
In addition to its large size for the era, the citadel included a complex well system that pulled water up from the Nile.
From atop the citadel, you can see far across the city, including to the Giza Necropolis.

