Then the LORD showed me the high priest Joshua, standing before the messenger from the LORD, and the Adversary was standing by his right side to accuse him.
References for Zechariah 3:1
And the LORD said to the Adversary: "The LORD rebukes you, Adversary. The LORD, the one choosing Jerusalem, rebukes you. Is this one not a log snatched from the fire?"
Joshua was wearing filthy clothes and standing before the messenger.
He responded to those standing before him, "Take off his filthy clothes." And he said to Joshua, "Look, I have removed your guilt from you. Put on priestly robes."
He said, "Put a clean turban upon his head." So they put the clean turban upon his head, and they dressed him in garments while the LORD's messenger stood by.
References for Zechariah 3:5
Then the LORD's messenger admonished Joshua:
"The LORD of heavenly forces proclaims: If you will walk in my paths, if you will keep my charge, then you will lead my house and guard my courts, and I will allow you to walk among those standing here.
Now listen, High Priest Joshua, you and your companions sitting before you— for these men are a sign— look, I am about to bring my servant, Branch.
See this stone that I have put before Joshua. Upon one stone, there are seven facets. I am about to engrave an inscription on it, says the LORD of heavenly forces. I will remove the guilt of that land in one day.
On that day, says the LORD of heavenly forces, everyone will invite their neighbors to sit beneath their vines and the fig trees."