Numbers 8:14-24

14 "Thus you shall separate the Levites from among the people of Israel, and the Levites shall be mine.
15 And after that the Levites shall go in to do service at the tent of meeting, when you have cleansed them and offered them as a wave offering.
16 For they are wholly given to me from among the people of Israel; instead of all that open the womb, the first-born of all the people of Israel, I have taken them for myself.
17 For all the first-born among the people of Israel are mine, both of man and of beast; on the day that I slew all the first-born in the land of Egypt I consecrated them for myself,
18 and I have taken the Levites instead of all the first-born among the people of Israel.
19 And I have given the Levites as a gift to Aaron and his sons from among the people of Israel, to do the service for the people of Israel at the tent of meeting, and to make atonement for the people of Israel, that there may be no plague among the people of Israel in case the people of Israel should come near the sanctuary."
20 Thus did Moses and Aaron and all the congregation of the people of Israel to the Levites; according to all that the LORD commanded Moses concerning the Levites, the people of Israel did to them.
21 And the Levites purified themselves from sin, and washed their clothes; and Aaron offered them as a wave offering before the LORD, and Aaron made atonement for them to cleanse them.
22 And after that the Levites went in to do their service in the tent of meeting in attendance upon Aaron and his sons; as the LORD had commanded Moses concerning the Levites, so they did to them.
23 And the LORD said to Moses,
24 "This is what pertains to the Levites: from twenty-five years old and upward they shall go in to perform the work in the service of the tent of meeting;