This is how Aaron's descendants, the priests, were divided into groups for service. The sons of Aaron were Nadab, Abihu, Eleazar, and Ithamar.
But Nadab and Abihu died before their father did, and they had no sons. So only Eleazar and Ithamar were left to carry on as priests.
With the help of Zadok, who was a descendant of Eleazar, and of Ahimelech, who was a descendant of Ithamar, David divided Aaron's descendants into groups according to their various duties.
Eleazar's descendants were divided into sixteen groups and Ithamar's into eight, for there were more family leaders among the descendants of Eleazar.
All tasks were assigned to the various groups by means of sacred lots so that no preference would be shown, for there were many qualified officials serving God in the sanctuary from among the descendants of both Eleazar and Ithamar.
Shemaiah son of Nethanel, a Levite, acted as secretary and wrote down the names and assignments in the presence of the king, Zadok the priest, Ahimelech son of Abiathar, and the family leaders of the priests and Levites. The descendants of Eleazar and Ithamar took turns casting lots.
The first lot fell to Jehoiarib. The second lot fell to Jedaiah.
The third lot fell to Harim. The fourth lot fell to Seorim.
The fifth lot fell to Malkijah. The sixth lot fell to Mijamin.
The seventh lot fell to Hakkoz. The eighth lot fell to Abijah.
The ninth lot fell to Jeshua. The tenth lot fell to Shecaniah.
The eleventh lot fell to Eliashib. The twelfth lot fell to Jakim.
The thirteenth lot fell to Huppah. The fourteenth lot fell to Jeshebeab.
The fifteenth lot fell to Bilgah. The sixteenth lot fell to Immer.
The seventeenth lot fell to Hezir. The eighteenth lot fell to Happizzez.
The nineteenth lot fell to Pethahiah. The twentieth lot fell to Jehezkel.
The twenty-first lot fell to Jakin. The twenty-second lot fell to Gamul.
The twenty-third lot fell to Delaiah. The twenty-fourth lot fell to Maaziah.
Each group carried out its duties in the house of the LORD according to the procedures established by their ancestor Aaron in obedience to the commands of the LORD, the God of Israel.
These were the other family leaders descended from Levi: From the descendants of Amram, the leader was Shebuel. From the descendants of Shebuel, the leader was Jehdeiah.
References for 1 Chronicles 24:20
From the descendants of Rehabiah, the leader was Isshiah.
From the descendants of Izhar, the leader was Shelomith. From the descendants of Shelomith, the leader was Jahath.
References for 1 Chronicles 24:22
From the descendants of Hebron, Jeriah was the leader, Amariah was second-in-command, Jahaziel was third, and Jekameam was fourth.
References for 1 Chronicles 24:23
From the descendants of Uzziel, the leader was Micah. From the descendants of Micah, the leader was Shamir,
along with Isshiah, the brother of Micah. From the descendants of Isshiah, the leader was Zechariah.
From the descendants of Merari, the leaders were Mahli and Mushi. From the descendants of Jaaziah, the leader was Beno.
From the descendants of Merari through Jaaziah, the leaders were Beno, Shoham, Zaccur, and Ibri.
From the descendants of Mahli, the leader was Eleazar, though he had no sons.
From the descendants of Kish, the leader was Jerahmeel.
From the descendants of Mushi, the leaders were Mahli, Eder, and Jerimoth. These were the descendants of Levi in their various families.
Like the descendants of Aaron, they were assigned to their duties by means of sacred lots, without regard to age or rank. It was done in the presence of King David, Zadok, Ahimelech, and the family leaders of the priests and the Levites.