Isaiah 19:3

And the spirit of Egypt shall fail in the midst thereof; and I will destroy the counsel thereof: and they shall seek to the idols, and to the charmers, and to them that have familiar spirits, and to the wizards.

The spirit of Egypt is Egypt's influence or disposition personified as an intelligent being, not a living, personal spirit belonging to Egypt. The mind of Egypt shall be left without counsel in itself, God will destroy the device or plan they take, and they shall seek counsel from idols and from sorcerers, from workers with spirits, and from soothsayers. This stands within a prophetic denunciation of Egypt resting on the land's complete dependence on the flooding of the Nile for irrigation, harvest, and life, so that shortfall, excess, or drying of its waters brings want, famine, and destruction of Egypt as a habitable land.

The verse belongs to the prophecy in Isaiah 19:1-13 about the revolutions and future state of Egypt, delivered more than twenty-four centuries ago. It foretold that Egypt, though ancient, powerful, populous, and naturally defended by sea, desert, navy, and Nile, would be invaded, conquered, spoiled, sold into the hand of strangers, made waste, diminished, made the basest of the kingdoms, never again exalt itself or rule over the nations, have no more a prince of its own, have its idols destroyed and its images cease, and have its rivers made dry, and it was fulfilled when Egypt was subjected to the Macedonians by Alexander the Great. The prophecy concerning Egypt has been fulfilled in part in Egypt. Its fulfillment includes the preaching of the Gospel in Egypt and Assyria in New Testament times. It belongs to a prophecy with nothing to be fulfilled in modern times, all accomplished centuries ago.

Egypt, forsaken by God, appeals to charmers, familiar spirits, and wizards for help. Neither nations nor persons turn to spirits while God is with them, for seeking spirits happens when God has departed. As Saul departed from the Lord and immediately went to spirits, so it is now.