Based in Mendes, Nepherites I was able to defeat other candidates for the throne. He formed an alliance with Sparta and recruited Greek mercenaries to fight against the Persians. Akhoris, who ruled shortly after him, waged war against the Persians with Euagoras of Cyprus, thereby beating off a Persian attack on Egypt. After the short reign of Nepherites II, beset by the threat of being deposed, the king of Kush succeeded in occupying part of Upper Egypt, roughly as far as Aswan.