"It is only those who have knowledge among His servants that fear Allah."
(Qur'an, Fatir 35:28)
The Messenger of Allah gave glad tidings to anyone who undertakes the task of seeking knowledge. Abu Hurayrah relates that the Prophet said, "For him who embarks on the path of seeking knowledge, Allah will ease for him the way to paradise." (Related by Muslim) If no Hadith on the importance of knowledge besides this one had been uttered by the Prophet , it would have been enough for Muslims. Yet the Prophet did more than that:
He used to stimulate his companions to seek knowledge: Ibn Mas'ud relates that the Prophet said, "Only two persons are worthy of being envied; a person upon whom Allah bestows riches and gives him the power to spend it in a righteous cause; and a person upon whom Allah bestows wisdom by which he judges and which he teaches." (Related by Bukhari and Muslim)
He used to congratulate the companions whenever they issued a right judgement or correctly answered a question. Imam Muslim narrates that once the Prophet asked Ubayy Ibn Ka'b, "Do you know which verse in Allah's Book is the greatest?" Ubayy answered by reciting Ayat-ul-Kursi (the verse of the Throne, i.e. Al-Baqarah, 2:255): "Allah! None has the right to be worshiped but He, the Ever Living, the One Who sustains and protects all that exists…) The Messenger kindly patted him on the chest, saying, "Congratulations, Abul-Munthir for this knowledge".