The Twenty-first Dynasty of Egypt (notated Dynasty XXI, alternatively 21st Dynasty or Dynasty 21) is usually classified as the first Dynasty of the Ancient Egyptian Third Intermediate Period, lasting from 1069 BC to 945 BC. After the reign of Ramesses III, a long, slow decline of royal power in Egypt followed. The pharaohs of the Twenty-first Dynasty ruled from Tanis, but were mostly active only in Lower Egypt, which they controlled.