How did the Prophet ﷺ know of future events if only Allah knows the unseen (ghayb)?
Creed & BeliefQ&A answerQ&ASeerah of Prophet Muhammed (S)1 Feb 2013YtpKPVI3c4MThe video starts at 1:15:44, where this question begins.
The answer
Allah subhanahu wa ta'ala gives of His knowledge to whomever He pleases. Ultimate ghayb means knowledge of everything, and that only Allah has. But there's another type of ghayb, which is called ghayb nisbi. And ghayb nisbi means relative ghayb. And relative ghayb is something that is so trivial that even sometimes physically it depends. So what is happening in the next room? This is ghayb to me and you, but it's not ghayb to the person in the next room, right? So there is ghayb nisbi, which is relative ghayb, and then there is ghayb mutlaq, which is ultimate ghayb. And ultimate ghayb only Allah knows. Only Allah subhanahu wa ta'ala knows the ultimate ghayb. But Allah subhanahu wa ta'ala says:
وَلَا يُحِيطُونَ بِشَيْءٍ مِّنْ عِلْمِهِ إِلَّا بِمَا شَاءَ
So Allah 'Azza wa Jal gives 'ilm to whomever He pleases. And therefore our Prophet ﷺ definitely had much more knowledge than we have, obviously. Is anybody going to say that he had the same knowledge we do? And Allah 'Azza wa Jal showed him things of Jannah and of Nar, and of the angels, and of those heavens in the Isra' and Mi'raj, and of the 'alam al-ghayb that we don't know about. There's no denying this.
And of the things that he knew: he knew Abu Bakr and Umar and Uthman and Ali would basically be... a Siddiq and shahidayn. And he knew many things as well. He knew that Ali and Aisha would have a civil war, and he encouraged the both of them to be calm about it. He knew this was going to happen. He knew Husayn would be killed, and he cried over this, and he said, "People of my ummah will kill my grandson." And he cried over this. So he knew these things would happen; Jibril told him these things. And so there's nothing difficult to understand about this.
An edited transcript of the video, lightly cleaned up for reading. The video is the source; if the text and the video differ, the video is correct.
Related questions
If Isa (Jesus) cannot hear those who call on him, how will he know what happened when he returns?
If everyone is born with the same fitrah, why is the prophets' fitrah so much purer?
Why did Allah give different shari'ahs to different nations instead of the perfected one from the start?
Was Prophet Ibrahim Kurdish, since he came from northern Iraq?
Who was Azar, whom the Qur'an names as the father of Ibrahim?
Are the parents of the Prophet ﷺ in Paradise or in Hell?
When the Prophet ﷺ says he is the Sayyid of the children of Adam, does that exclude Adam himself?
How do those who say angels never die reconcile that with Allah alone being al-Hayy, al-Awwal and al-Akhir?