In the fifth century BCE, Egypt had been part of the Achaemenid empire. However, in 404, a quarrel had started between king Artaxerxes II Mnemon and his younger brother Cyrus, which lasted until 401. Seizing the opportunity, an Egyptian leader named Amyrtaeus, had managed to regain the independence of the ancient country of the Nile. His reign, however, had been unstable, and he was removed from the throne by Nepherites I, the first pharaoh of the Twenty-Ninth or Mendesian dynasty. He stabilized the country.
After his death in 392/391, his relative Achoris succeeded him. However, another relative named Psammuthis was able to expel him briefly. We do not know why and how. After a year, Achoris eliminated Psammuthis and was the uncontested sole ruler of a reunited Egypt.
Achoris was by far the most capable pharaoh of the twenty-ninth dynasty. Until then, Egypt had been allied to the Greek town Sparta. After 400, both had fought against Persia. However, the Spartan king Agesilaus had been recalled to Greece, and Achoris understood that he had to find a new ally. In fact, he concluded not one but two alliances. His first ally was Euagoras, the king of Salamis on Cyprus, who had revolted against Persia. The second treaty was concluded in 389 with Athens, which possessed a large navy.
The three allies controlled the eastern Mediterranean, and this made Egypt almost unvulnerable to a Persian attack. If king Artaxerxes II Mnemon wanted to recover his lost territory, he would have to send his army along the coast between Gaza and Pelusium, where the soldiers would be exposed to attacks from the sea. At the same time, the allies could strike everywhere along the Syrian and Phoenician coast. Egypt was a great power again.
Artaxerxes realized this, and decided that he had to conclude peace with Sparta and the other Greek towns, so that he could concentrate on a war against Egypt. In 386, the peace treaty was signed (the "King's Peace" or "Peace of Antalcidas"), and in 385 and 383, the Persian generals Pharnabazus and Tithraustes lead armies against Egypt. At the same time, the Persians suppressed the revolt of Euagoras.
The Egyptian expeditions, however, were less successful. The attackers were thrown back by Egyptian soldiers and Greek mercenaries, commanded by the Athenian general Chabrias. (In order to pay the mercenaries, Achoris ordered the first Egyptian coins to be minted.) Achoris was able to retaliate, and Egyptian soldiers and troops of Euagoras were briefly fighting in Phoenicia and Cilicia. To Egypt, this victory was the beginning of forty years of great prosperity.
Achoris was responsible for an ambitious building program. The results have come to light during excavations at (a.o.) Letopolis, Memphis, Saqarra, Medinet Habu, Karnak, and Elephantine.
Achoris was succeeded by his son Nepherites II, but after rule of only four months, he was killed by Nectanebo I, the first pharaoh of the thirtieth (and last) dynasty of independent Egypt.