Then he showed me the high priest Joshua standing before the angel of the Lord, and Satan standing at his right hand to accuse him.
References for Zechariah 3:1
And the Lord said to Satan, "The Lord rebuke you, O Satan! The Lord who has chosen Jerusalem rebuke you! Is not this man a brand plucked from the fire?"
References for Zechariah 3:2
Now Joshua was dressed with filthy clothes as he stood before the angel.
The angel said to those who were standing before him, "Take off his filthy clothes." And to him he said, "See, I have taken your guilt away from you, and I will clothe you with festal apparel."
And I said, "Let them put a clean turban on his head." So they put a clean turban on his head and clothed him with the apparel; and the angel of the Lord was standing by.
Then the angel of the Lord assured Joshua, saying