In a moment of deep crisis, David flees Jerusalem accompanied by his loyal servants. As he leaves, the spiritual leadership joins him. The priests and Levites emerge from the city carrying the Ark of the Covenant to accompany the exiled king.
To allow the multitude of soldiers and citizens to pass by, the priests set the Ark down by the side of the road [רש"י, אברבנאל]. They kept it stationed there until the entire crowd had finished passing [רש"י]. To show proper respect, they even constructed a raised, fortified platform upon which to place the Ark [מלבי"ם].
The actions of Abiathar the priest during this event are understood in a few ways. He simply went up to the raised platform where the Ark rested, standing guard beside it in a show of honor until everyone had left the city [מלבי"ם, מצודת דוד, רד"ק, אברבנאל]. Another perspective suggests that Zadok actually arrived first with the Ark, which is why David addressed him initially, and Abiathar only came up to join them later [רלב"ג].
Beyond these physical descriptions, most commentators share a deeper tradition regarding Abiathar, interpreting his movement as a departure from his role. On this historic day, Abiathar was effectively removed from the position of High Priest. He had attempted to seek guidance from God using the Urim and Thummim but received no answer. In contrast, Zadok sought God's guidance and was answered. When David saw that the Holy Spirit had left Abiathar and rested upon Zadok instead, he realized a divine shift was occurring. This marked the fulfillment of an ancient curse placed upon the descendants of Eli the Priest, from whom Abiathar descended. Simultaneously, it fulfilled the blessing given to Phinehas, Zadok's ancestor, promising his line an eternal priesthood [רד"ק, אברבנאל].
Even though Abiathar lost his practical standing at that moment, Zadok was not officially and exclusively anointed as the sole High Priest until the reign of Solomon, which was when Abiathar was permanently expelled [מצודת דוד, רד"ק, אברבנאל].