Numbers 8:16-19
8:16 For they are entirely given to me from among the Israelites. I have taken them for myself instead of all who open the womb, the firstborn sons of all the Israelites.
8:17 For all the firstborn males among the Israelites are mine, both humans and animals; when I destroyed all the firstborn in the land of Egypt I set them apart for myself.
8:18 So I have taken the Levites instead of all the firstborn sons among the Israelites.
8:19 I have given the Levites as a gift to Aaron and his sons from among the Israelites, to do the work for the Israelites in the tent of meeting, and to make atonement for the Israelites, so there will be no plague among the Israelites when the Israelites come near the sanctuary.”