After the unrest of the 1st Intermediate Period, the so-called Middle Kingdom began with the reunification of Upper Egypt and Lower Egypt, usually considered to consist of the 11th and 12th Dynasties. The kings in Thebes, and from the 12th Dynasty on in the new residence Itjitawy, once again controlled the whole country. The local nomarchs, whose increasing independence had contributed to the fall of the Old Kingdom, lost a part of their influence, but it was no longer possible to create an absolute state, as was the case in the first part of the Old Kingdom. Only at the end of the 12th Dynasty, under Amenemhat III, was there an absolute state for a short time, but because of the strong measures taken against the local powers, which included disinheritance and dispossession, the Middle Kingdom came to an end shortly after. Important from a religio-historical point of view is the rise of the god Amun, who eventually surpassed the god Montu. Amun became so important that Thebes was able to match cities like Heliopolis and Memphis as a religious centre.