God warns Pharaoh through Moses: the next morning, swarms will arrive. They will fill the houses of the Egyptians, the ground itself. But Goshen — the region where Israel lives — will be untouched. God declares the separation before it happens, so that Pharaoh will know it is intentional.
The swarms come. Egypt is ruined by them. Pharaoh calls Moses and makes his first offer of compromise: worship here, within Egypt. Moses refuses — the sacrifices Israel must offer are an abomination to Egyptians; they cannot be performed in Egypt. Pharaoh counters: go, but not far. Moses pushes back again. Only a full three-day journey into the wilderness will do.
Pharaoh relents — provisionally. Moses prays, and the flies leave entirely, not one remains. And then the familiar conclusion: Pharaoh hardens his heart again. The negotiation was tactical, not sincere. He will not let the people go.