Exodus 10:5

And they shall cover the face of the earth, that one cannot be able to see the earth: and they shall eat the residue of that which is escaped, which remaineth unto you from the hail, and shall eat every tree which groweth for you out of the field:

God's warning was delivered to Pharaoh through Moses and Aaron that if he refused to let Israel go, locusts would be brought into the coasts of Egypt. They would cover the face of the earth so that the land could not be seen, and would eat the residue that escaped and remained from the hail, including the remaining crops and every tree growing out of the field. The locusts came at Moses' command and departed only at his bidding. Their coming exposed the powerlessness of Serapis, whom the Egyptians trusted to protect them from locusts, to protect the land.

Pharaoh was given a choice to humble himself before God and let Israel go or to refuse and suffer the effects of the plague. The threatened plague belonged to God's great signs and wonders to display His power, to confirm Israel's faith in Him as the only true and living God, and to give unmistakable evidence of the distinction He placed between the Egyptians and His people. It was to make all nations know that though Israel had been bound down by hard labor and despised, He had chosen them as His peculiar people to deliver in a wonderful manner, with the account to be told to succeeding generations, to sons and sons' sons, so they would know He is the LORD.