The Lord told Moses to say to Pharaoh that he must let his people go to serve him, and that if he refused, the land would be plagued with frogs. Aaron stretched out his hand over the waters of Egypt and the frogs covered the land. The magicians did the same with their secret arts. Pharaoh asked Moses and Aaron to plead with the Lord to take the frogs away, and promised to let the people go. Moses let him choose the time, and the next day the frogs died in the houses, courtyards and fields, and were piled in heaps until the land stank. But when Pharaoh saw there was relief, he hardened his heart and would not listen.
The Lord told Aaron to stretch out his staff and strike the dust of the earth, and the dust became gnats on people and animals throughout Egypt. The magicians tried to do the same and could not. They told Pharaoh this was the finger of God, but Pharaoh's heart was hardened and he would not listen.
In the morning, God told Moses to present himself to Pharaoh again by the river and announce swarms of flies on the Egyptians, their servants and their houses. But he would set apart the land of Goshen, where his people lived, so that it would be known that he is the Lord in the midst of the land. So it happened, and the land was ruined by the flies. Pharaoh summoned Moses and Aaron and told them to sacrifice to their God within the land. Moses replied that this would not be right, since Israel's sacrifices would be detestable to the Egyptians, and that they would go a three-day journey into the wilderness.
Pharaoh agreed, asking that they not go very far and that they pray for him. Moses warned him not to deal deceitfully again. He prayed to the Lord and the flies were gone, not one left. But Pharaoh hardened his heart this time too and did not let the people go.