Shemaiah son of Nethanel, a Levite, acted as secretary and wrote down the names and assignments in the presence of the king, the officials, 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.