Zadok, the son of Ahitub, was a priest during King David's reign and a descendant of Aaron. He was faithful during David's problem with his son, Absalom. Zadok and his fellow priest, Abiathar, set down the Ark until David and his followers passed out of the city. He then remained in Jerusalem and kept David informed of Absalom's plans. When the rebellion ended, Zadok talked to the elders of Judah, influencing them to take David back as king.
When David was nearing the end of his life, Zadok favored Solomon and refused to endorse Adonijah as the next king. He then poured a flask of sacred oil on Solomon and anointed him as king. After Abiathar's exile (he had favored Adonijah to succeed David as king), Zadok becomes the head priest, and his descendants continued as high priests for many years.
In Ezekiel 48:11, the Lord states that a strip of land that will surround the future Temple will be for the sons of Zadok, who were obedient and did not sin, when the people of Israel and the rest of the tribe of Levi did. The events of Zadok are found in 2 Samuel, 1 Kings, 1 Chronicles, and 2 Chronicles.