Allah, the Most Wise says in His Noble Book:
Ø¹ÙØ§ÙÙÙ…Ù Ø§ÙÙ’ØºÙÙÙ’Ø¨Ù ÙÙÙÙØ§ ÙÙØ¸Ù’ÙÙØ±Ù Ø¹ÙÙÙÙ ØºÙÙÙ’Ø¨ÙÙÙ Ø£ÙØÙØ¯ÙØ§ Â Ø¥ÙÙÙÙ’Ø§ Ù…ÙÙÙ Ø§Ø±Ù’ØªÙØ¶ÙÙ Ù…ÙÙ Ø±ÙÙ’Ø³ÙÙÙÙ ÙÙØ¥ÙÙÙÙ’ÙÙ ÙÙØ³Ù’ÙÙÙÙ Ù…ÙÙ Ø¨ÙÙÙ’ÙÙ ÙÙØ¯ÙÙÙ’ÙÙ ÙÙÙ…ÙÙÙ’ Ø®ÙÙÙ’ÙÙÙÙ Ø±ÙØµÙØ¯ÙØ§ ÙÙÙÙØ¹Ù’ÙÙÙ…Ù Ø£ÙÙ ÙÙØ¯Ù’ Ø£ÙØ¨Ù’ÙÙØºÙÙØ§ Ø±ÙØ³ÙØ§ÙÙØ§ØªÙ Ø±ÙØ¨ÙÙ’ÙÙÙ…Ù’ ÙÙØ£ÙØÙØ§Ø·Ù Ø¨ÙÙ…ÙØ§ ÙÙØ¯ÙÙÙ’ÙÙÙ…Ù’ ÙÙØ£ÙØÙ’ØµÙÙ ÙÙÙÙÙ’ Ø´ÙÙÙ’Ø¡Ù Ø¹ÙØ¯ÙØ¯ÙØ§
âThe Knower of the unseen! So He does not reveal His secrets to any, except to him whom He chooses as a messenger; for surely He makes a guard to march before him and after him, Â So that He may know that they have truly delivered the messages of their Lord, and He encompasses what is with them and He records the number of all things.â 
In the first part of this verse it is revealed that Allah alone is the knower of the unseen and then it continues:
When Allah likes someone and finds him worthy of His Satisfaction from the messengers, He informs him of the unseen and makes him dominant over it to the exclusion of others.
In the condition of covering and manifesting the knowledge of the unseen, Allah appoints two groups to oversee it:
One group is the protectors from amongst the messengers who are in front of them after becoming aware of the unseen. They are appointed to check that during the completion of this duty and explaining this knowledge to the men, Satan does not whisper in their minds and this pure and clear knowledge is not rendered adulterated and tarnished.
The second group of protectors is that of the defenders who (protect them) from behind, i.e. before their becoming aware of the knowledge, settle between the source of the revelation and its descent and them (the messengers), so that the revelation retains its condition till it reaches the heart of the Prophet, without the interference of the inhabitants of the heavenly worlds. This group of protectors from amongst the angels are those who are a part (of the events) from the descent of the revelation, itâs passing through the different sequences and levels, until it reaches the Prophet.
All the arrangements for guarding are to ensure that the deliverance of the message of these messengers comes out in the exact manner and is correctly fulfilled, because we know that the verse ââ¦that He knows that certainly they have delivered their messageâ. These two groups of angels, from the rear and front, are to ascertain the fact that they deliver to the men whatever they have received. 
This method of communication is similar to the style pursued by kings and rulers to ensure that their deputies and messengers convey the message accurately to the subjects.
Firstly, they protect this message from (the time) it leaves their territory. Secondly, to ensure that it is not tampered or altered or changed along the way, they appoint watchers over the message.
Likewise in the first leg when Ilme Ghaib is communicated to the Prophets by Allah, there should not be any seizure or change. In the second leg also, i.e. delivering knowledge to the men, there must not be any kind of alteration or miscommunication. This is dependent on certain factors:
Firstly the messenger receives the revelation and the (knowledge of) unseen things correctly.
Secondly, after correctly receiving it, he safeguards it well and remembers it.
And thirdly after receiving it correctly and remembering and safeguarding it, at the time of communicating it, delivering it without any addition or deletion. And these three aspects of infallibility must be present in the messengers. In Quranâs words this is infallibility pre-communication âÙ…ÙÙÙ’ Ø¨ÙÛÙ’ÙÙ ÛÙØ¯ÙÛÙ’ÙÙ â and infallibility post-communication âÙ…ÙÙÙ’ Ø®ÙÙÙ’ÙÙÙÙâ.
Apart from this it has been mentioned in the verse that God is aware of all things big and small in the heavens and the earth in the material and spiritual worlds and is closer to the messengers than they themselves. He loves his messengers and is satisfied with them. Due to this, He gives them control over the unseen which is His exclusive domain. Over here it is pertinent to ponder over some points.
The first point: All knowledge including the unseen is exclusively for God and nobody including the messengers and angels have any access to it. Whatever knowledge has been granted to the creatures is a bestowal from Allahâs side. The creatures cannot access it independently. If it were not for divine bestowal there was no way for them to access the knowledge no matter how basic or trivial.
One who understands this will find no discrepancy or contradiction in verses which on one hand restrict knowledge to Allah and on the other hand mention of knowledge granted to the creatures.
Verses of this nature have come in several places in the Noble Quran with regards to other activities restricted to Allah with the creatures also playing a role in the activities.
For example, the verse Ø§ÙÙÙÙÙ ÛÙØªÙÙÙÙÙÙ’Ûâ Ø§ÙØ§Ù’ÙÙÙØ³Ù âAllah takes the soulsâ proves the restriction of capturing souls.
Another verse mentions âuntil when death comes to one of you, Our messengers cause him to die..â
And similarly the verse, âHonour is only for Allahâ and ââ¦and to Allah belongs the might and to His Messenger and to the believers, but the hypocrites do not knowâ 
In these verses, on one hand it is mentioned that honor is (only) for Allah, and on the other hand it is asserted that honor is accorded to the Prophet (s.a..w.a.) and the believers.
Therefore with regards to the unseen, the knowledge originates from Allah and He grants it to whosoever He pleases. There is no contradiction in it.
It also helps understand the significance of the many verses where the Holy Prophet (s.a.w.a.) has denied knowledge of the unseen, for example:
ÙÙÙ ÙØ§ÙÙ’ Ø£ÙÙÙÙÙÙ ÙÙÙÙÙ…Ù’ Ø¹ÙÙØ¯ÙÙ Ø®ÙØ²ÙØ¢Ø¦ÙÙÙ Ø§ÙÙÙ’ÙÙ ÙÙÙØ§ Ø£ÙØ¹Ù’ÙÙÙ…Ù Ø§ÙÙ’ØºÙÙÙ’Ø¨Ù ÙÙÙØ§ Ø£ÙÙÙÙÙÙ ÙÙÙÙÙ…Ù’ Ø¥ÙÙÙÙ’Ù Ù…ÙÙÙÙÙ Ø¥ÙÙÙ’ Ø£ÙØªÙÙ’Ø¨ÙØ¹Ù Ø¥ÙÙØ§ÙÙ’ Ù…ÙØ§ ÙÙÙØÙÙ Ø¥ÙÙÙÙÙÙ’ ÙÙÙÙ’ ÙÙÙÙ’ ÙÙØ³Ù’ØªÙÙÙÙ Ø§ÙØ£ÙØ¹Ù’Ù…ÙÙ ÙÙØ§ÙÙ’Ø¨ÙØµÙÙØ±Ù Ø£ÙÙÙÙØ§Ù ØªÙØªÙÙÙÙÙÙ’Ø±ÙÙÙÙ
âSay: I do not say to you, I have with me the treasures of Allah, nor do I know the unseen, nor do I say to you that I am an angel; I do not follow aught save that which is revealed to me. Say: Are the blind and the seeing one alike? Do you not then reflect?â
Similarly, in the following verse the Prophet (s.a.w.a.) declares:
ÙÙÙ ÙØ§ÙÙ’ Ø£ÙÙ…Ù’ÙÙÙÙ ÙÙÙÙÙÙ’Ø³ÙÙ ÙÙÙÙ’Ø¹ÙØ§ ÙÙÙØ§Ù Ø¶ÙØ±ÙÙ’Ø§ Ø¥ÙÙØ§ÙÙ’ Ù…ÙØ§ Ø´ÙØ§Ø¡ Ø§ÙÙÙ’ÙÙ ÙÙÙÙÙÙ’ ÙÙÙØªÙ Ø£ÙØ¹Ù’ÙÙÙ…Ù Ø§ÙÙ’ØºÙÙÙ’Ø¨Ù ÙØ§ÙØ³Ù’ØªÙÙÙ’Ø«ÙØ±Ù’ØªÙ Ù…ÙÙÙ Ø§ÙÙ’Ø®ÙÙÙ’Ø±Ù ÙÙÙ…ÙØ§ Ù…ÙØ³ÙÙ’ÙÙÙÙ Ø§ÙØ³ÙÙ’ÙØ¡Ù Ø¥ÙÙÙ’ Ø£ÙÙÙØ§Ù’ Ø¥ÙÙØ§ÙÙ’ ÙÙØ°ÙÙØ±Ù ÙÙØ¨ÙØ´ÙÙØ±Ù ÙÙÙ’ÙÙÙÙ’Ù…Ù ÙÙØ¤Ù’Ù…ÙÙÙÙÙÙ
âSay: I do not control any benefit or harm for my own soul except as Allah please; and had I known the unseen I would have had much of good and no evil would have touched me; I am nothing but a warner and the giver of good news to a people who believe.â
ÙÙÙÙ’ Ù…ÙØ§ ÙÙÙØªÙ Ø¨ÙØ¯Ù’Ø¹ÙØ§ Ù…ÙÙ’ÙÙ’ Ø§ÙØ±ÙÙ’Ø³ÙÙÙ ÙÙÙ…ÙØ§ Ø£ÙØ¯Ù’Ø±ÙÙ Ù…ÙØ§ ÙÙÙÙ’Ø¹ÙÙÙ Ø¨ÙÙ ÙÙÙÙØ§ Ø¨ÙÙÙÙ…Ù’ Ø¥ÙÙÙ’ Ø£ÙØªÙÙ’Ø¨ÙØ¹Ù Ø¥ÙÙÙÙ’Ø§ Ù…ÙØ§ ÙÙÙØÙÙ Ø¥ÙÙÙÙÙÙ’ ÙÙÙ…ÙØ§ Ø£ÙÙÙØ§ Ø¥ÙÙÙÙ’Ø§ ÙÙØ°ÙÙØ±Ù Ù…ÙÙ’Ø¨ÙÙÙÙ
The Prophet (s.a.w.a.) also says:
And a similar verse: âSay: I am not the first of the messengers, and I do not know what will be done with me or with you: I do not follow anything but that which is revealed to me, and I am nothing but a plain warner.
In all such verses the Prophet (s.a.w.a.) denies exclusive knowledge of the unseen. He confesses that he relies on revelation for such knowledge, which is the exclusive domain of Allah.
It has been revealed in Surah Aaraaf (7):
ÙÙÙ ÙØ§ÙÙ’ Ø£ÙÙ…Ù’ÙÙÙÙ ÙÙÙÙÙÙ’Ø³ÙÙ ÙÙÙÙ’Ø¹ÙØ§ ÙÙÙØ§Ù Ø¶ÙØ±ÙÙ’Ø§ Ø¥ÙÙØ§ÙÙ’ Ù…ÙØ§ Ø´ÙØ§Ø¡ Ø§ÙÙÙ’ÙÙ
âSay: I do not control any benefit or harm for my own soul except as Allah pleasesâ¦â
It has been revealed to the Prophet (s.a.w.a.) in Surah Yunus (10):
ÙÙÙ ÙØ§ÙÙ’ Ø£ÙÙ…Ù’ÙÙÙÙ ÙÙÙÙÙÙ’Ø³ÙÙ Ø¶ÙØ±ÙÙ’Ø§ ÙÙÙØ§Ù ÙÙÙÙ’Ø¹ÙØ§ Ø¥ÙÙØ§ÙÙ’ Ù…ÙØ§ Ø´ÙØ§Ø¡ Ø§ÙÙÙ’ÙÙ
âSay: I do not control for myself any harm, or any benefit except what Allah pleasesâ¦â
 Surah Jinn (72): 26-28
 Similarly it has been quoted in the Holy Quran viz. Surah Ankabut (29): 3 ( âso Allah will certainly know those who are true and He will certainly know the liarsâ) and Surah Hadeed (57): 25 (âand that Allah may know who helps Him and His messengers in the secretâ)
 Surah Zumar (39): 42
 Surah Anaam (6): 61
 Surah Nisa (4): 139 and Surah Munafeqoon (63): 8
 Surah Anaam (6): 50
 Surah Aaraf (7): 188
 Surah Ahqaaf (46): 9
 Surah Aaraf (7): 188
 Surah Yunus (10): 49