Allaah telling the Messengers about the Ghayb

Question: When we tell our brothers that it is only Allaah Who has knowledge of the Ghayb (Unseen) and that no messenger or angel knows it, they say that the Messenger of Allaah (peace be upon him) knew the Ghayb and that the Qur’an which he was sent with is Ghayb. They take Allaah’s statement: “(He Alone is) the All-Knower of the Ghayb (Unseen), and He reveals to none His Ghayb (Unseen).” Except to a Messenger (from mankind) whom He has chosen (He informs him of unseen as much as He likes) as evidence. They also claim that the Messenger (peace be upon him) was among those whom Allaah chose to inform of the Ghayb. What is Your Honor’s opinion? Is it permissible to say that the Messenger knew the Ghayb based on the previous Aayah? We hope that Your Honor will respond to this question

Answer: The knowledge of the Ghayb belongs to Allaah (Exalted be He) Alone, for His statement, Say: “None in the heavens and the earth knows the Ghayb (Unseen) except Allaah” and: Say (O Muhammad صلى الله عليه وسلم): “I possess no power over benefit or harm to myself except as Allaah wills. If I had the knowledge of the Ghayb (Unseen), I should have secured for myself an abundance of wealth, and no evil should have touched me.… read more here.

Five keys to the Ghayb only known to Allaah

Question: Allaah (Exalted be He) says in His Book: Verily Allâh, with Him (Alone) is the knowledge of the Hour, He sends down the rain, and knows that which is in the wombs. No person knows what he will earn tomorrow, and no person knows in what land he will die. Verily, Allaah is All-Knower, All-Aware (of things). This Aayah (Qur’aanic verse) contains these Words of Allaah’s: …and knows that which is in the wombs.

My friend and I had a long discussion about this Aayah. He told me that modern science and the doctors can now know what is inside women’s wombs; whether they are carrying a boy or a girl, through ultrasound.

I told him that Allaah (Glorified be He) says: …and knows that which is in the wombs. Does the Aayah mean that science has not discovered what is inside the wombs or there is another Tafseer (explanation/exegesis of the meanings of the Qur’aan) for the Aayah?

Answer: It is authentically reported in the Saheeh (authentic) Hadeeth that the five keys to the Ghayb (Unseen) are only known to Allaah, and they are mentioned in this Aayah, which is the subject of this question. It is related by Al-Bukhaaree on the authority of `Abd Allaah ibn `Umar (may Allaah be pleased by them) that the Messenger of Allaah (peace be upon him) said… read more here.