The Middle Kingdom of Egypt ( "The Period of Reunification") follows a period of political division known as the First Intermediate Period. The Middle Kingdom lasted from around 2050 BC to around 1710 BC, stretching from the reunification of Egypt under the reign of Mentuhotep II of the Eleventh Dynasty to the end of the Twelfth Dynasty. The Eleventh Dynasty ruled from Thebes and the Twelfth Dynasty ruled from el-Lisht. During the Middle Kingdom period, Osiris became the most important deity in popular religion. The Middle Kingdom was followed by the Second Intermediate Period of Egypt, another period of division that involved foreign invasions of the country by the Hyksos of West Asia.