The Thirty-first Dynasty of Egypt also known as the Second Egyptian Satrapy was effectively a short-living province of the Achaemenid Persian Empire between 343 BCE to 332 BCE. After an interval of independence, during which three indigenous dynasties reigned (the 28th, 29th, and 30th dynasty), Artaxerxes III (358–338 BC) reconquered the Nile valley for a brief second period (343–332 BC), which is called the Thirty-first Dynasty of Egypt.
It is not known who served as satrap after Artaxerxes III, but under Darius III (336–330 BC) there was Sabaces, who fought and died at Issus and was succeeded by Mazaces. Egyptians also fought at Issus, for example, the nobleman Somtutefnekhet of Heracleopolis, who described on the "Naples stele" how he escaped during the battle against the Greeks and how Arsaphes, the god of his city, protected him and allowed him to return home.
In 332 BC Mazaces handed over the country to Alexander the Great without a fight. The Achaemenid empire had ended, and for a while Egypt was a satrapy in Alexander's empire. Later the Ptolemies and the Romans successively ruled the Nile valley.