Exodus 7:4–5 (ESV)

4 Pharaoh will not listen to you. Then I will lay my hand on Egypt and bring my hosts, my people the children of Israel, out of the land of Egypt by great acts of judgment.

God will punish the Egyptians, not only the people, but also their gods (Exodus 12:12; Numbers 33:4). His purpose is the liberation of Israel (compare with Exodus 3:8; Exodus 6:6).

This is how Israel becomes a nation that serves the Lord, a nation that knows that God liberated them (Exodus 6:7) and a nation that sings his praises (see Exodus 15:1–27).