In 747 B.C., Piye, the Kushite ruler of Nubia, attempted to conquer Egypt. Within the first decade of his reign, he had conquered Upper Egypt. In 728 B.C., an alliance of Lower Egyptian rulers led by Tefnakhte formed to fight the Nubians, but they were defeated by Piye.
During the chaotic Third Intermediate Period of Egyptian history, four kings were claiming rule within the Upper and Lower Kingdoms, and local chieftains were controlling their own small regions in the Nile Delta and elsewhere. Piye, who held Egypt in high esteem, moved to conquer and unify the land once again. He first conquered Egypt up to Thebes. Here he had his sister Amenirdis named the successor of Shepenwepet to make her the highest ranking priestess of the powerful cult of Amun, a critical political and religious position. Amenirdis later adopted Piye's daughter, who married her brother and pharaoh in a move to cement the Kushite rule.
After a brief pause for a trip back to Nubia to celebrate the new year, Piye came back and continued northward, conquering city after city. To the north, the Libyan king Tefnakhte conquered the important city of Memphis and was threatening Hierakleopolis, a city ruled by Piye's ally Peftjauawybast. Piye came to his assistance, and taking every major city on the way, he then conquered Memphis in order to reunite Egypt. Rather than rule himself, he allowed petty kings and rulers of the conquered areas to swear allegiance to him as Pharaoh, then returned home to Kush.