Exodus 11
1 The LORD said to Moses, "Yet one plague more I will bring upon Pharaoh and upon Egypt; afterwards he will let you go hence; when he lets you go, he will drive you away completely."
...
4 And Moses said, "Thus says the LORD: About midnight I will go forth in the midst of Egypt;
5 and all the first-born in the land of Egypt shall die, from the first-born of Pharaoh who sits upon his throne, even to the first-born of the maidservant who is behind the mill; and all the first-born of the cattle.
6 And there shall be a great cry throughout all the land of Egypt, such as there has never been, nor ever shall be again.
7 But against any of the people of Israel, either man or beast, not a dog shall growl; that you may know that the LORD makes a distinction between the Egyptians and Israel.
8 And all these your servants shall come down to me, and bow down to me, saying, 'Get you out, and all the people who follow you.' And after that I will go out." And he went out from Pharaoh in hot anger.
9 Then the LORD said to Moses, "Pharaoh will not listen to you; that my wonders may be multiplied in the land of Egypt."
10 Moses and Aaron did all these wonders before Pharaoh; and the LORD hardened Pharaoh's heart, and he did not let the people of Israel go out of his land.
Exodus 12
29 At midnight the LORD struck down all the firstborn in the land of Egypt, from the firstborn of Pharaoh who sat on his throne to the firstborn of the prisoner who was in the dungeon, and all the firstborn of the livestock.
30 Pharaoh arose in the night, he and all his officials and all the Egyptians; and there was a loud cry in Egypt, for there was not a house without someone dead.
31 Then he summoned Moses and Aaron in the night, and said, "Rise up, go away from my people, both you and the Israelites! Go, worship the LORD, as you said.
32 Take your flocks and your herds, as you said, and be gone. And bring a blessing on me too!"