Numbers 8:18-26

18 but I have taken the Levites in place of all the firstborn among the Israelites.
19 Moreover, I have given the Levites as a gift to Aaron and his sons from among the Israelites, to do the service for the Israelites at the tent of meeting, and to make atonement for the Israelites, in order that there may be no plague among the Israelites for coming too close to the sanctuary.
20 Moses and Aaron and the whole congregation of the Israelites did with the Levites accordingly; the Israelites did with the Levites just as the Lord had commanded Moses concerning them.
21 The Levites purified themselves from sin and washed their clothes; then Aaron presented them as an elevation offering before the Lord, and Aaron made atonement for them to cleanse them.
22 Thereafter the Levites went in to do their service in the tent of meeting in attendance on Aaron and his sons. As the Lord had commanded Moses concerning the Levites, so they did with them.
23 The Lord spoke to Moses, saying:
24 This applies to the Levites: from twenty-five years old and upward they shall begin to do duty in the service of the tent of meeting;
25 and from the age of fifty years they shall retire from the duty of the service and serve no more.
26 They may assist their brothers in the tent of meeting in carrying out their duties, but they shall perform no service. Thus you shall do with the Levites in assigning their duties.
New Revised Standard Version Bible, copyright 1989, Division of Christian Education of the National Council of the Churches of Christ in the United States of America. Used by permission. All rights reserved.