And he shewed me Joshua the high priest standing before the angel of the Lord, and Satan standing at his right hand to resist him. And the Lord said unto Satan, The Lord rebuke thee, O Satan; even the Lord that hath chosen Jerusalem rebuke thee: is not this a brand plucked out of the fire? Now Joshua was clothed with filthy garments, and stood before the angel. And he answered and spake unto those that stood before him, saying, Take away the filthy garments from him. And unto him he said, Behold, I have caused thine iniquity to pass from thee, and I will clothe thee with change of raiment. And I said, Let them set a fair mitre upon his head. So they set a fair mitre upon his head, and clothed him with garments. And the angel of the Lord stood by. And the angel of the Lord protested unto Joshua, saying, Thus saith the Lord of hosts; If thou wilt walk in my ways, and if thou wilt keep my charge, then thou shalt also judge my house, and shalt also keep my courts, and I will give thee places to walk among these that stand by.

Zachariah 3:1-7

Like in the case of Job, Satan here sought to be permitted to sift Joshua, the High Priest (not Joshua, the son of Nun, who led Israel after Moses to the Promised Land). In Job’s case, there was no unrighteousness in Job but mere Satanic jealousy because of Job’s blessing in righteousness. But in the case of Joshua, the High Priest, Satan stood a better chance because Joshua was clothed with filthy garments, which means stains of sin and unrighteousness. It is wonderful to see how God Himself resisted and rebuked Satan on Joshua’s behalf, forgave his sins, gave him a robe of righteousness, and set him a fair mitre upon his head. Here we can see a foretaste of our Lord Jesus Christ, our intercessor and High Priest, who takes our place by the throne of God and comes to our aid when we are facing our accuser, the Devil.