Sayyiduna Abdullah bin Amr bin al-As (may Allah be pleased with them both) said: I heard the Messenger of Allah (peace and blessings be upon him) saying: "Allah Almighty created His creation in darkness, then cast some of His light upon them. Whoever was reached by some of that light on that day was guided, and whoever was missed by that light went astray. That is why I say: the pens have written and dried, in accordance with the knowledge of Allah."
Imam al-Shafi'i (may Allah have mercy on him) said: Then Allah, the Mighty and Majestic, made clear that the best of His creation are the prophets, as He says: "At first all mankind was one community; then Allah sent the prophets as bearers of glad tidings and as warners" [Surah al-Baqarah: 213]. So Allah Almighty chose our Prophet (peace and blessings be upon him) from among His servants to be entrusted with His revelation and to establish His proof among them.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب السير / 17710