Numbers 3:8-18

8 They will take care of all the furnishings in the tent of meeting and work for the Israelites, doing what needs to be done for the inner tent.
9 Give the Levites to Aaron and his sons. The Levites will be the only Israelites given to them.
10 Appoint Aaron and his sons to serve as priests. Anyone else who tries to do the priests' duties must be put to death."
11 The LORD said to Moses,
12 "Out of all the Israelites, I have taken the Levites to be substitutes for every firstborn male offspring among them. The Levites are mine,
13 because every firstborn is mine. The day I killed every firstborn male in Egypt, I set apart as holy every firstborn in Israel, whether human or animal. They will be mine. I am the LORD."
14 The LORD said to Moses in the Desert of Sinai,
15 "Count the Levites by households and families. Count every male who is at least one month old."
16 So Moses did what the LORD said and registered them as he had been commanded.
17 Gershon, Kohath, and Merari were the sons of Levi.
18 Libni and Shimei were the sons of Gershon. Their families were named after them.