When David was not permitted to build the temple, he proceeded, among the last acts of his life, with the assistance of Zadok and Ahimelech, to organize the priestly and musical services to be conducted in the house of God.
This arrangement was re-established by Hezekiah ( 2 Chronicles 31:2 ); and afterwards the four sacerdotal courses which are said to have returned from the Captivity were re-divided into the original number of twenty-four by ( Ezra 6:18 ).