The Gemara in Tamid 32a writes:
He said to them: Who among you is wiser than the others? They said to him: We are all equal in wisdom, as every matter that you say to us, we solve for you unanimously. He said to them: What is the substance of this stance, by which you, the Jewish people, oppose me? Since you are my subjects, and my people constitute the majority, you should concede that our lifestyle is superior. They said to him: Your dominance is inconsequential, as sometimes even the Satan is victorious, by convincing people to act in a manner that is clearly incorrect. (Sefaria translation, emphasise mine).
The Rabbeinu Gershom, Rabbi Gershom ben Yehudah, explains in his commentary on this Gemara that this means that the Satan leads the wicked astray and gives them a redemption.
אמרו ליה סטנא נצח. כלומר אל תתמה על זה שהשטן הוא נוצח שמתעה אותם ונותן להם גאולה ולסוף יורידם לגיהנם
What exactly does this mean? What is this "redemption" and are there sources that say this is somewhat connected to the end of days (Chevlei Moshiach, Ikvesa DiMeshicha)?
See also the Zohar in Tetzaveh, with the commentary of the Sulam, where it interprets the words "mikeitz yamim" and "mikeitz yamin" (Daniel 12:13) to mean that there will be two kinds of redemptions, one from the evil side, and one redemption from the holy side.
As always, please use sources and I love to have some "pearls" of insights on this :).