In 539 BC Cyrus of Persia conquered Babylon and immediately gave permission to the captive Jews to return to their homeland and rebuild Jerusalem and the temple. Chief among those who returned were the governor Zerubbabel and the high priest Joshua (or Jeshua) the son of Jehozadak (or Jozadak) (Ezra 2:1-2).
Under the leadership of Zerubbabel and Joshua, the returned exiles set up the altar soon after they arrived in Jerusalem (Ezra 3:1-2). They laid the foundation of the temple the next year (Ezra 3:8-11), but when opposition discouraged the builders, the work stopped (Ezra 4:1-5). Sixteen years later God raised up the prophets Haggai and Zechariah to stir up Zerubbabel, Joshua and the people to get to work once more on the temple (Ezra 4:24; 5:1-2; Hag 1:1-11). When work restarted, the prophets brought further messages of encouragement to the people through Zerubbabel and Joshua (Hag 1:12-15; 2:1-9). The rebuilding of the temple was a preparation for the coming of the Messiah. When, in anticipation of this Messiah, the Jews conducted a coronation ceremony, the person they should have crowned was Zerubbabel, for he was not only governor but also a Davidic prince in the line of the Messiah (Matt 1:6,12,16). Instead they crowned the priest Joshua, to avoid any action that may have appeared to the Persians as treason. The ceremony emphasized that the joint rule of Joshua and Zerubbabel, the priest and the prince, foreshadowed the rule of the priest-king Messiah (Zech 6:9-14).
Dealing with sin
In a vision that the prophet Zechariah saw, Joshua the high priest was standing before God in dirty garments. Standing beside Joshua was Satan, ready to make the accusation that the people were unclean because of their long exile in idolatrous Babylon. They were therefore no longer fit to serve God or build him a temple. By clothing Joshua in clean garments, God showed that he had forgiven and cleansed his people (Zech 3:1-10). Sadly, the people’s renewed devotion was short-lived. Joshua’s sons did not truly follow God and, like many of their countrymen, married unbelieving non-Jewish women. When rebuked by Ezra, they put away their foreign wives and offered sacrifices for their wrongdoing (Ezra 10:18-19).