Exodus 10:12
And the LORD said unto Moses, Stretch out thine hand over the land of Egypt for the locusts, that they may come up upon the land of Egypt, and eat every herb of the land, even all that the hail hath left. And the LORD said unto Moses, Stretch out thine hand over the land of Egypt for the locusts, that they may come up upon the land of Egypt, and eat every herb of the land, even all that the hail hath left.
The verse is God's command to Moses to stretch out his hand over Egypt for the locusts to come up and eat every herb and all vegetation left after the hail. Before the plague came, Moses and Aaron warned Pharaoh that if he would not let Israel go God would bring locusts into the coasts of Egypt to cover the face of the earth and eat the residue that escaped the hail, leaving Pharaoh free to choose to humble himself and let Israel go or refuse and suffer the plague, and the locusts came exactly as he had been told. God sent that warning after bearing Pharaoh's continual rebellion and suffering him to resist so He could show great signs and wonders before Pharaoh and Israel, to confirm Israel's faith in Him as the only true and living God, to give unmistakable evidence of the difference He placed between the Egyptians and His people, to prove He had chosen despised and hard-labored Israel as His peculiar people and would work wonderfully for their deliverance, to cause all nations to know Him, and so that Israel may tell in the ears of son and son's son what He wrought in Egypt and know that He is the LORD.
When Moses stretched forth his rod, the LORD brought an east wind over the land all that day and all that night, and in the morning the wind brought an unprecedented swarm of locusts over all the land and coasts of Egypt, very grievous and without equal before or after. The locusts covered the face of the whole earth so that the land and sky were darkened, and ate every herb of the land and all the fruit of the trees the hail had left, leaving no green thing in trees or field through all Egypt, and nearly destroyed Egypt. It was a dreadful, miraculous judgment, and the Egyptians feared that after eating everything in the field the locusts would attack and devour the people. The judgment exposed the powerlessness of Serapis, whom the Egyptians regarded as the protector against locusts, and taught that protection comes from Jehovah rather than idols.
Pharaoh then hastily called for Moses and Aaron, confessed he had sinned against the LORD and against them, asked forgiveness for his sin only this once, and begged them to entreat the LORD to take away this death. At Moses' entreaty the LORD turned a mighty strong west wind that took away all the locusts and cast them into the Red Sea, leaving not one locust in all the coasts of Egypt. But the LORD hardened Pharaoh's heart, so that after relief from threatened death he hardened himself again, broke his humble promise, and still refused to let the children of Israel go.
In this Pharaoh chose to endure the plague and to receive plague after plague rather than submit to God, yielding only as much as he was compelled to do by dreadful visitation and taking back what he granted when affliction was removed, persisting in rebellion without remorse even while he saw his whole kingdom lying ruined under these dreadful judgments. The devastation forced him further than his earlier grants to sacrifice in Egypt and to let the men alone go, granting that the children and wives might go also while still refusing to let the cattle go, leading to the warning that the angel of God would slay the firstborn.