“The entire 974 generations (as brought down in Chagiga 13b, as mentioned above) which are the ‘Erev Rav’ which are the souls from the world of chaos (TOHU), Gd transplants them every generation, and they are the brazenfaced of the generation. Our sages said that in the period of ‘Mashiach’s footsteps’ impudence will become great…and the Erev Rav will return to be the leaders of Israel.
– Sifra DiTzniuta Chapter 1
“Before the arrival of Moshiach, most of the rabbis will be from the Erev Rav, because Israel in themselves are holy, but the Erev Rav only work for their own benefit . . . wanting to rule over the public . . . One should only join with those who truly serve G-d and sacrifice themselves to Him, but not in order to receive any benefit.”
– Divrei Chaim, Parashas Vayakhel, ‘Omissions’
According to the Arizal, the erev rav, at the time of Moshe, were unfinished Jews, so to speak, in need of at least one more reincarnation to complete their journey into the Jewish people. However, Moshe told G-d this would have taken too long if their joining the Jewish nation was necessary for bringing the Final Redemption. This was a miscalculated risk, because the Final Redemption had to be pushed off for thousands of years due to their premature membership into the Jewish people. Even worse, they have become a huge obstacle to the Final Redemption, as the Vilna Gaon warned would be the case:
“Our main service and battle is to break and to remove the strength of the Erev Rav, the klipah of Armelius the Evil, from the Jewish people; the Erev Rav is our greatest enemy, the one who separates the two moshiachs. The klipah of the Erev Rav works only through deception and roundabout ways, and therefore the war against the Erev Rav is the most difficult and bitterest of all.”
But even this is all part of G-d’s ultimate plan:
“The general purposes of the two moshiachs, Moshiach ben Yosef and Moshiach ben David, throughout all the generations has been to protect and fight against the three ‘heads’ of the klipot (evil forces): Eisav, Yishmael and the Erev Rav…..”
Just like roses are sown amongst the thorns, which are a protection for the roses, so the Jewish people are in exile amongst the `erev rav in order to speed up their redemption, and for this reason the thorns have not ceased – Tikkunei Zohar p. 54
This means that the troubles we are suffering due to the erev rav have a purpose, and that purpose is Mashiach!
 Kol HaTor, Ch. 2:2:2
 Kol HaTor, Ch. 2:2:2