16 Then the LORD said to Moses, “Say to Aaron, `Stretch out your staff and strike the dust of the earth, that it may become 1gnats through all the land of Egypt.'” 17 They did so; and 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 through all the land of Egypt. 18 The magicians tried with their secret arts to bring forth gnats, but they could not; so there were gnats on man and beast. 19 Then the magicians said to Pharaoh, “This is the finger of God.” But Pharaoh’s heart was hardened, and he did not listen to them, as the LORD had said.
20 Now the LORD said to Moses, “Rise early in the morning and present yourself before Pharaoh, as he comes out to the water, and say to him, `Thus says the LORD, “Let My people go, that they may serve Me. 21 “For if you do not let My people go, behold, I will send swarms of flies on you and on your servants and on your people and into your houses; and the houses of the Egyptians will be full of swarms of flies, and also the ground on which they dwell. 22 “But on that day I will set apart the land of Goshen, where My people are living, so that no swarms of flies will be there, in order that you may know that I, the LORD, am in the midst of the land. 23 “I will2put a division between My people and your people. Tomorrow this sign will occur.”‘” 24 Then the LORD did so. And there came great swarms of flies into the house of Pharaoh and the houses of his servants and the land was laid waste because of the swarms of flies in all the land of Egypt.
Frogs were apparently easy enough to produce deceitfully, but gnats and flies were a little more difficult. God was upping the challenge with each plague, until Pharaoh would have no choice but to concede. Be careful when you test God, you may get more than you bargained for. Pharaoh certainly did.