King David organized the descendants of Aaron into groups according to their duties. He was assisted in this by Zadok, a descendant of Eleazar, and by Ahimelech, a descendant of Ithamar.
The descendants of Eleazar were organized into sixteen groups, while the descendants of Ithamar were organized into eight; this was done because there were more male heads of families among the descendants of Eleazar.
The descendants of Eleazar and of Ithamar took turns drawing lots. Then they were registered by Shemaiah son of Nethanel, a Levite secretary. The king, his officials, the priest Zadok, Ahimelech son of Abiathar, and the heads of the priestly families and of the Levite families, were all witnesses.
These men were registered according to their assignments for going to the Temple and performing the duties established by their ancestor Aaron in obedience to the commands of the LORD God of Israel.
The head of each family and one of his younger brothers drew lots for their assignments, just as their relatives, the priests descended from Aaron, had done. King David, Zadok, Ahimelech, and the heads of families of the priests and of the Levites were witnesses.