There would be eleven more dynasties in Egypt, but its most important years were long past. The Twenty-First through the Twenty-Fourth dynasties made up what was called the Third Intermediate Period (1070-712 b. c.) During this time, the pharaohs took up residence in Tanis, far to the north, while the priests maintained control in Thebes. Eventually the latter became a separate nation, a theocracy (thee-OCK-ruh-see; a government controlled by religious leaders) called the Divine State of Amon. In the Twenty-Second Dynasty, Libyans began to take control.
In 712 B. C. the Kushites, who once had been ruled by the Egyptians, invaded and became the new rulers of the nation. This initiated what was called the Late Period (712-332 b. c.) In 672, the Assyrians drove out the Kushites and put in an Egyptian king named Necho (NEE-koh; r. 672-664 b. c.), who they thought would do their bidding. Instead, he ushered in the last phase of Egyptian independence for many centuries to come. It was during this final flowering of Egyptian culture that demotic script developed.
By the beginning of the Twenty-Seventh Dynasty, Egypt had come under the influence of the Persians. Just as the era of Necho was a mere shadow of Egypt's glory days, the dynasties from the Twenty-Eighth to the Thirtieth (404-343 b. c.), when Egyptians ruled one last time, were a mere shadow of Necho's time. In the Thirty-First and last dynasty, Persians once more took control.
Then in 332 b. c., troops under Alexander the Great conquered Egypt. They would set up the dynasty of the Ptolemies, of which cleopatra would become the most famous. The Romans took Egypt out of her hands in 30 b. c.. It would remain part of the Roman Empire, and later of the Byzantine Empire that evolved from Rome, for nearly 700 years. Egypt came under the influence of the coptic branch of Christianity, which still exists in parts of the country today.
The land would remain in Byzantine hands until a. d. 640, when it was conquered by Muslim troops from Arabia.