the reason for the black coloring in that case was religious and not genetic. In 1098–1088 BC, Thebes was "the scene of a civil war-like conflict between the High Priest of Amun of Thebes Amenhotep and the Viceroy of Kush Panehesy (= the Nubian)". It was chaotic and many tombs were plundered. Instead of sending soldiers to restore order, Ramesses XI put Panehesy in control of that area's military and appointed him Director of Granaries. Panehesy stationed his troops in Thebes to protect the city from thieves, but it resembled a military occupation of Thebes to the High Priest, which later led to the Civil war in Thebes. By 1082 BC, Ramesses XI finally sent help to the High Priest. Panehesy continued his revolt and the city of Thebes suffered from "war, famine, and plunderings". Panehesy initially succeeded and the High Priest fled Thebes. Panehesy pursued the High Priest as far as Middle Egypt before Egyptian forces pushed Panehesy and his troops out of Egypt and into Lower Nubia. Ramesses sent new leadership to Thebes: Herihor was named the new High Priest of Thebes (and effectively King of Southern Egypt) and Paiankh was named the new Viceroy of Kush. Paiankh recaptured former Egyptian holdings in Lower Nubia as far as the second Nile cataract, but could not defeat Panehesy in Lower Nubia, who ruled the area until his death. Herihor's descendants became rulers of Egypt's 21st and 22nd Dynasties. Napatan Empire (750–542 BC) There are competing theories on the origins of the Kushite kings of the 25th Dynasty: some scholars believe they were Nubian officials that learned "state level organization" by administering Egyptian-held Nubia from 1500 to 1070 BC, such as the rebel Viceroy of Kush, Panehesy, who ruled Upper Nubia and some of Lower Nubia after Egyptian forces withdrew. Other scholars believe they are descended from families of the Egyptianized Nubian elite supported by Egyptian priests or settlers. Children of elite Nubian families were sent to be educated in Egypt then returned to Kush to be appointed in bureaucratic positions to ensure their loyalty. During the Egyptian occupation of Nubia, there were temple towns with Egyptian cults, but "production and redistribution" was based mostly on indigenous social structures. The El Kurru chiefdom likely played a major role in the development of the Kingdom of Kush due to its access to gold producing areas, control of caravan routes, more arable