Then the LORD said to Moses, “Say to Aaron, ‘Stretch out your staff and strike the dust of the earth, so that it may become gnats in all the land of Egypt.’” And they did so. Aaron stretched out his hand with his staff and struck the dust of the earth, and there were gnats on man and beast. All the dust of the earth became gnats in all the land of Egypt. The magicians tried by their secret arts to produce gnats, but they could not. So there were gnats on man and beast. Then the magicians said to Pharaoh, “This is the finger of God.” But Pharaoh’s heart was hardened, and he would not listen to them, as the LORD had said.
Then the LORD said to Moses, “Rise up early in the morning and present yourself to Pharaoh, as he goes out to the water, and say to him, ‘Thus says the LORD, “Let my people go, that they may serve me. Or else, if you will not let my people go, behold, I will send swarms of flies on you and your servants and your people, and into your houses. And the houses of the Egyptians shall be filled with swarms of flies, and also the ground on which they stand. But on that day I will set apart the land of Goshen, where my people dwell, so that no swarms of flies shall be there, that you may know that I am the LORD in the midst of the earth. Thus I will put a division between my people and your people. Tomorrow this sign shall happen.”’” And the LORD did so. There came great swarms of flies into the house of Pharaoh and into his servants’ houses. Throughout all the land of Egypt the land was ruined by the swarms of flies.
Then Pharaoh called Moses and Aaron and said, “Go, sacrifice to your God within the land.” But Moses said, “It would not be right to do so, for the offerings we shall sacrifice to the LORD our God are an abomination to the Egyptians. If we sacrifice offerings abominable to the Egyptians before their eyes, will they not stone us? We must go three days’ journey into the wilderness and sacrifice to the LORD our God as he tells us.” So Pharaoh said, “I will let you go to sacrifice to the LORD your God in the wilderness; only you must not go very far away. Plead for me.” Then Moses said, “Behold, I am going out from you and I will plead with the LORD that the swarms of flies may depart from Pharaoh, from his servants, and from his people, tomorrow. Only let not Pharaoh cheat again by not letting the people go to sacrifice to the LORD.” So Moses went out from Pharaoh and prayed to the LORD. And the LORD did as Moses asked, and removed the swarms of flies from Pharaoh, from his servants, and from his people; not one remained. But Pharaoh hardened his heart this time also, and did not let the people go. (Exodus 8:16-32 ESV)
Geb was the Egyptian god over the dust of the earth and Khepri was the god of creation and rebirth, whose head was represented as the head of a fly. Yahweh was showing that none of Egypt’s gods was His equal and it becomes apparent to Pharaoh’s magicians that this is the case when they cannot in any way duplicate Moses’ calling up of the gnats from the dust of the earth. Despite trying to warn him Pharaoh hardens his heart yet again, forcing Moses to call up swarms of flies, giving further evidence of Yahweh’s favor on Israel by keeping them free of the plague.
Pharaoh tries to bargain with Yahweh and keep the people in the land but Moses not only shows the logistical problems with that but the obedience problem with that. Yahweh has told them to do this. Though Pharaoh indicates he won’t go back on his word this time, he does. The plagues will be ramped up.
When God brings judgment on our foes He knows how to protect us in the midst of that judgment. This is very important for understanding His outpouring of judgment yet future as depicted in Revelation. Believers will likely feel the impact of those judgments indirectly, but they will be protected by God from the actual judgments, as Israel was in Egypt. We don’t need to fear the judgments poured out by God. We need to trust Him to take care of us during them.