Judgement according to intentions
Narrated A’isha (radi Allahu anha) that the Messenger of Allah (sal Allahu alaihi wa sallam) said, “An army will raid the Ka’bah and when it reaches a desert land, all of them will be swallowed up by the earth.” She asked; “O Messenger of Allah! Why all of them?” He answered, “All of them will be swallowed by the earth but they will be raised for Judgement according to their intentions.”
[Al-Bukhari and Muslim]
Everyone will be rewarded or punished according to his aim and intention.
This Hadith also proves that the company of depraved persons is extremely dangerous. Whose army would it be, which has been referred to in the Hadith, and when will it invade Ka’bah?? This is a matter known to Allah Alone. Such prophecies are a part of the Unseen world. Since they come in the category of the miracles of the Prophet (sal Allahu alaihi wa sallam), it is necessary to believe in their veracity and occurrence. Believing in such prophecies is also essential because they were revealed by Allah.