This happens at the time of the rising of Imam al-Mahdi (AS)...
This happens at the time of the rising of Imam al-Mahdi (AS) who he will get revenge from all tyrants throughout the history and will implement the government of Justice, and when the righteous will rule over the entire universe (not just this Earth). Let us study some of the verses of Quran in this regard through the words of Ahlul-Bayt (AS).
Abu Basir narrated: I asked Imam al-Sadiq (AS) about the verse: "And on the day when We will gather from every nation a group (27:83)" He (AS) said: "What do people say about it?" I said: "They say it is in the Day of Judgment." Thereupon Imam al-Sadiq (AS) said: "Do you think Allah will gather from every nation only a group, and leave the rest? Verily this verse is about al-Raj'a.
On the other hand, the verse related to the Day of Judgment is: 'and We shall gather them together and shall not leave out anyone. (18:47)'" (Tafsir Ali Ibn Ibrahim, as quoted in al-Bihar, v53, p51, Hadith #27) Also, on the commentary of the verses: "And on the day when We will gather from every nation a group from among those who rejected Our Signs, then they shall be set in arrays. Until when they come, He will say: Did you reject my signs while you could not encompass them in knowledge?
Or what was it that you did? (27:83-84)" Imam al-Sadiq (AS) said: "The Signs are the Leader of Faithful and the Imams (after him)... and this is about al-Raj'a" (Tafsir Ali Ibn Ibrahim, as quoted in al-Bihar, v53, p53, Hadith #30) Muhammad Ibn Muslim as well as Abu Basir narrated: On the commentary of verse: "And (We) have made binding on the society which We destroyed that they shall not return.
(21:95)" Imam al-Baqir (AS) and Imam al-Sadiq (AS) both said: "Every society that Allah has destroyed by punishment do not return in al-Raj'a. Thus this verse is one of the greatest signs for al- Raj'a since no one among the People of Islam denies that all people return in the Day of Judgment whether they are destroyed by punishment or not. Therefore His saying 'they shall not return' points to al-Raj'a (returning to the world).
This is while they shall return to the Day of Judgment in order to enter the Fire." (Tafsir Ali Ibn Ibrahim, as quoted in al-Bihar, v53, p52, Hadith #29) Also on the commentary of verse "O Lord! Thou caused us die twice, and Thou hast given (back) to us life twice, so we do confess our faults; is there then a way to get out?