The Hasmoneans committed a grave error when, in addition to claiming the "crown" of the Priesthood, they also claimed the crown of royalty in defiance of G‑d's command. They were severely punished by G‑d, and did not only lose the crown after four successive Hasmonean kings died a violent death, but Herod, son of a Gentile slave, became the next king after he had murdered nearly all the Hasmoneans still alive. All this is part of Nachmanides' commentary: (on Genesis 49:10) "The scepter shall not leave Judah". The Talmud (Baba Batra 50) goes so far as to say that anyone claiming to be descended from the Hasmoneans is bound to be a slave, i.e. have Herod's blood in him (Herod had married Miriam, a sister of the Hasmoneans). The failure to re-instate the house of David when there was a chance to do so will not be repaired until the coming of the Mashiach. Mashiach ben Joseph…comes to help re-establish the Davidic dynasty…

At that time, re-instatement of the dynasty of David will be preceded by the Kingdom of Joseph, since the Mashiach ben Joseph will precede the arrival of the Mashiach ben David. After the arrival of the Mashiach ben David the damage caused by the house of Joseph ever since the splitting of the Kingdom of David (Rehoboam) under Jeroboam will be repaired. The Mashiach ben Joseph, when he comes, does not come in order to establish his own dynasty, rather he comes to help re-establish the Davidic dynasty. He will even sacrifice his life in order to accomplish this. His blood will atone for the sins of the Jewish people. This atonement will take the form of the Davidic dynasty being restored to the Jewish people as an everlasting kingdom.

When that stage in history is reached, both of Joseph's dreams will be fulfilled. His two dreams foreshadowed his reign in Egypt as well as his reign in the future, as the Mashiach ben Joseph respectively. In both instances, his reign preceded or will precede that of the reign of David or the Mashiach ben David respectively. Both periods of the reign of the kingdom of Joseph were or will be beneficial for the whole Jewish people because in both instances they were or will be designed to pave the way for the permanent kingdom of David.

When that time comes, the tikun will be completed, and the world will be as good as at the time it was created - when both body and soul were on an equally elevated level.

[Translation and commentary by Eliyahu Munk]