Together with Zadok from the descendants of Eleazar and Ahimelech from the descendants of Ithamar, David divided them according to the assigned duties of their service.