In the times of Ezra and Nechemia the temple was rebuilt. Rambam codifies that the mitzvah to appoint a king comes before the mitzvah to build the temple. If that is the case why didn't the Jews appoint a king (perhaps in secret to avoid political backlash) before beginning to rebuild the temple?
2Because they were part of the Persian empire and appointing a king is a declaration of Independence.– Clint EastwoodAug 18, 2019 at 4:01
1@ClintEastwood You could at least describe some of the films you've done in your profile.– Turk HillAug 18, 2019 at 8:00
Wow, a nice one. Doesn't Rambam speak about the initial arrangement when entering the promised land? I don't see that Rambam requires the two before rebuilding the Temple, do you?– Al BerkoAug 18, 2019 at 9:21
Perhaps there's a connection to the fact that Koresh is described in Yeshayahu as an anointed of Hashem. If he's the anointed of the era, then they may have thought that there was no need for a Jewish king at the time.– Harel13Jul 4, 2021 at 6:15
Some commentators say that Zerubbabel was supposed to be king (such as Ibn Ezra, see e.g. his commentary to 4:14). Zerubbabel is never explicitly called a king, but he was from the royal family (1 Chronicles 3:19), and also served as governor (פֶּחָה) of Judea (Haggai 1:1).
Zerubbabel was the one who built the Temple (he participates in the building in Ezra, e.g. 3:2, and Zechariah 4:9 credits the building to him).
So it seems that the Judeans did appoint Zerubbabel as king, or at least tried to do so, before rebuilding the Temple. It's true that his position as governor didn't pass to his descendants like kingship normally does, but that was only clear after the fact.
1So did he have all the halachos of a king?– HeshyAug 18, 2019 at 10:32
1@Heshy I don't know. The Bible doesn't say so about him, but it also doesn't really say much about laws of a king with regard to the other kings before him. It's also not clear that he practically was considered king, because the verses that describe him as king use the future tense– b aAug 18, 2019 at 10:48