Numbers 8:5-26 ESV
And the LORD spoke to Moses, saying, “Take the Levites from among the people of Israel and cleanse them. Thus you shall do to them to cleanse them: sprinkle the water of purification upon them, and let them go with a razor over all their body, and wash their clothes and cleanse themselves. Then let them take a bull from the herd and its grain offering of fine flour mixed with oil, and you shall take another bull from the herd for a sin offering. And you shall bring the Levites before the tent of meeting and assemble the whole congregation of the people of Israel. When you bring the Levites before the LORD, the people of Israel shall lay their hands on the Levites, and Aaron shall offer the Levites before the LORD as a wave offering from the people of Israel, that they may do the service of the LORD. Then the Levites shall lay their hands on the heads of the bulls, and you shall offer the one for a sin offering and the other for a burnt offering to the LORD to make atonement for the Levites. And you shall set the Levites before Aaron and his sons, and shall offer them as a wave offering to the LORD.
“Thus you shall separate the Levites from among the people of Israel, and the Levites shall be mine. And after that the Levites shall go in to serve at the tent of meeting, when you have cleansed them and offered them as a wave offering. For they are wholly given to me from among the people of Israel. Instead of all who open the womb, the firstborn of all the people of Israel, I have taken them for myself. For all the firstborn among the people of Israel are mine, both of man and of beast. On the day that I struck down all the firstborn in the land of Egypt I consecrated them for myself, and I have taken the Levites instead of all the firstborn among the people of Israel. 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 when the people of Israel come near the sanctuary.”
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. 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. And after that the Levites went in to do their service in the tent of meeting before Aaron and his sons; as the LORD had commanded Moses concerning the Levites, so they did to them.
And the LORD spoke to Moses, saying, “This applies to the Levites: from twenty-five years old and upward they shall come to do duty in the service of the tent of meeting. And from the age of fifty years they shall withdraw from the duty of the service and serve no more. They minister to their brothers in the tent of meeting by keeping guard, but they shall do no service. Thus shall you do to the Levites in assigning their duties.”
ESV: English Standard Version 2016