Exodus 13:15

And it came to pass, when Pharaoh was stubborn about letting us go, that the LORD killed all the firstborn in the land of Egypt, both the firstborn of man and the firstborn of beast. Therefore I sacrifice to the LORD all males that open the womb, but all the firstborn of my sons I redeem.'