It is because of his knowledge and the actions based on...
It is because of his knowledge and the actions based on divine guidance that he attains the position of being proclaimed God's Proof ( hujjat ) and His manifestation on earth. It is obvious that not every person on this earth is capable of fulfilling these requirements and effecting the laws of God in human society.
It is necessary that the person assuming this sensitive position should be endowed with a spiritual and human perfection so as to establish proper contact with the divine source and receive the knowledge and retain it for the community. Moreover, this person must possess both physical and mental qualities most appropriate to the execution of his functions as the leader and guide of the Muslim community.
He cannot afford to be fallible and erroneous in conveying the religious truth necessary for the well being of humanity. Hence, it must be maintained that the Prophet and the Imams are the best in creation. More importantly, it is because of these personal qualities that God, the Almighty, appoints them in the position of a Prophet and an Imam. These qualities are present in them from the time they come into this world.
At the appropriate time and as the situation demands, and provided there are no obstacles, they become manifest. It is only then that these individuals become selected and appointed as Prophets and Imams with the mission to carry and effect God's ordinances for humanity. This manifest designation may occur at times after they attain the age of maturity, and at other times even while they are younger in age.
The Qur'an provides the best example of the appointment to the prophethood at a very young age. In the example of Jesus (peace be upon him), the Qur'an speaks about the miracle of Jesus while he was still a baby in the cradle. At that time Jesus introduced himself as a prophet who had brought the revealed message for the Children of Israel. Thus, he says: Lo, I am God's servant; God has given me the Book, and made me a Prophet.
Blessed He has made me, wherever I may be; and He has enjoined me to pray, and to give the alms, so long as I live. (Sura Maryam, 29) From this and other verses of the Qur'an it is clear that Jesus (peace be upon him) from his very early childhood had been appointed as the Prophet and had been given the Book.