Verses 16-20:
When Pharaoh saw the effects of the plague of locusts, he became desperate. He sent "in haste" for Moses and Aaron. He acknowledged, "I have sinned against Jehovah your Elohe, and against you." He admitted his sin against Jehovah, but did not acknowledge Him as his God.
Pharaoh admitted his sin ’against Moses and Aaron in making promises to them and then failing to keep them.
"I pray thee," I beg of you. The proud sovereign now became the pitiful supplicant, the beggar.
Not only did Pharaoh acknowledge his sin, he asked forgiveness. He was suffering under Divine judgment. But it was not repentance; it was a desire for relief from suffering.
Jehovah heard this request, and sent a "mighty strong west wind," lit. "a very strong sea-wind," from the Mediterranean Sea. This wind blew the locusts in the direction they had come, and they drowned in the waters of the Red Sea, or "Sea of Reeds." Not one locust was left in Egypt.
When Pharaoh saw that the plague was lifted, he changed his mind and refused to let Israel go. "The Lord hardened" his heart, but only after he had made the fatal choice of sin against knowledge.