Allah T'ala sent the Prophet Muhammad (s.a.a.w.) as  شَاهِدً

 Allah T'ala says in the Holy Quran:

 يَا أَيُّهَا النَّبِيُّ إِنَّا أَرْسَلْنَاكَ شَاهِدًا وَمُبَشِّرًا وَنَذِيرًا

O Prophet, We have sent you as a witness, a bearer of good news and a warner. (33:45)

 

The meaning of the Prophet's being a "witness" is very vast. It includes three kinds of evidence:
(1) Verbal evidence, i.e. the Prophet should bear out the truth of the realities and principles on which Allah's Religion is based and tell the world plainly that they are the truth and all that is opposed to them is falsehood. He should rise to proclaim without hesitation and fear the Being of Allah and His Unity, the existence of the angels, the corning down of Revelation, the occurrence of life-after-death, the Hell and Heaven, all are realities, even if they appear strange to the world, and the people mock the one presenting them, or call him a madman. Likewise, the Prophet should openly present before the people the concepts, values, principles and rules pertaining to morality and civilization and social life that God has revealed to him, and reject as wrong all the concepts and ways which are prevalent and are opposed to them, even if the whole world rejects them as wrong and violates them in practice. Similarly, the Prophet should proclaim as lawful what is lawful in Allah's Law even if the whole world regards it as unlawful, and should proclaim as unlawful whatever is unlawful in Allah's Law even if the world regards it as lawful and pure.


(2) Practical evidence: That is, the Prophet in his own life should practically demonstrate all that he has been commissioned to present before the world. His life should be free from every shade of that which he calls evil, and his own character should clearly reflect that which he calls good; he should be the foremost in carrying out what he regards as obligatory, and most cautious in refraining from what he calls sinful. He should exert his utmost to enforce the code of life which he calls Divine. His own character and conduct should bear out how sincere and truthful he is in his invitation; and his own self should be such a model of his teaching that anyone who sees him should know what kind of a man he wants to produce by the Faith to which he invites the world, what kind of a character he wants to instil in him and what system of life he wants to be established through him in the world.

(3) Evidence in the Hereafter That is, when the Court of Allah is established in the Hereafter, the Prophet should give evidence to prove that he had conveyed to the people the whole message, without making any alteration or change in it, that had been entrusted to him, and that he had shown no slackness in making the truth manifest before them, by word and by deed. On the basis of this evidence it will be determined what reward the believers deserve and what punishment the disbelievers deserve From this one can have an idea of how great a responsibility had Allah placed upon the Holy Prophet by raising him to the position of a "witness", and how great should be the personality worthy of that high position. Evidently, there has been no slackness whatever on the part of the Holy Prophet in the matter of giving evidence with regard to the Faith, verbally as well as practically. That is why in the Hereafter he will be able to testify that he had made the Truth plain to the people, and that is how Allah's argument will be established against them; otherwise, if, God forbid, there had been any slackness on the pan of the Prophet in providing evidence, he could neither be a witness against them in the Hereafter nor could any case be established against the deniers of the truth. Some people have tried to give a different interpretation to the word witness". They say that the Holy Prophet in the Hereafter will bear witness to the acts and deeds of the people. From this they conclude that the Holy Prophet is watching and witnessing the acts of all the people; otherwise he could not bear the witness. But according to the Qur'an this interpretation is absolutely wrong. The Qur'an tells us that Allah has arranged a different system for recording the acts of the people. For this purpose His angels are preparing the conduct-book of every person. (See in this connection Surah Qaf: 17-18, and Al-Kahf: 49). After this He will make the people's own limbs also to bear witness against them. (Ya Sin: 65, Ha Mim As-Sajdah: 20-21). As for the Prophets, they are not to testify to the acts of the people, but to give evidence to prove that they had conveyed the Truth to the people. The Qur'an clearly says:
"On the Day when Allah will assemble aII the Messengers, He will ask: 'What was the response you received?' They will answer, `We have no knowledge: You alone havc the full knowledge of all that is hidden'." (AI-Ma`idah: 109)
In the same connection, the Quran says about the Prophet Jesus that when he will be questioned about the deviation of the Christians, he will say: "I was a witness to their conduct as long as I remained among them, but after You recalled me. You watched over them." (AI-Ma'idah: 117)
These verses clearly show that the Prophets will not be witnesses in regard to the acts of the people. As to what they will bear witness to the Qur'an gives an equally clear answer:
"O Muslims, We have made you a community of the 'Golden Mean' so that you may be witnesses in regard to mankind and the Messenger may be a witness in regard to you." (AI-Baqarah: 143)
"(O Muhammad, warn them of) the Day when We shall call a witness from among every community to testify against it. And We shall call you to testify against these people." (An-Nahl: 89)
This shows that on the Day of Resurrection the Holy Prophet's evident in its nature will not be any different from the evidence for bearing which the Holy Prophet's community and the witnesses in regard to every other community will be summoned. Evidently, if it be an evidence in regard to the acts, then the omnipresence of all of them also becomes necessary. And if these witnesses will be called to give evidence to confirm that the Creator's message had reached His creation, inevitably the Holy Prophet also will be called upon to give a similar evidence.
The same is supported by the Hadith which Bukhari. Muslim, Tirmidhi. Ibn Majah, lmam Ahmad and others have related on the authority of 'Abdullah bin 'Mas'ud, 'Abdullah bin 'Abbas, Abu ad-Darda', Anas bin Malik and many other Companions (may Allah be pleased with them all), whose common theme is this: 'The Holy Prophet on the Day of Resurrection will sec some of his Companions bing brought, but instead of coming to him they will either be going or being pushed to the other side. Thereupon the Holy Prophet will say: 'O Allah, they are my Companions!' Allah will say: 'You do not know what misdeeds they committed after you'." This theme has been reported by numerous Companions and with so many chains of authorities that there remains no doubt about its authenticity. This proves that the Holy Prophet is not at aII a witness to each individual of his community and to each of his acts. As for the hadith which says that the acts of the people of his Ummah are presented before him, it does not in any way contradict this, because its purport is that Allah keeps him informed of the affairs of his Ummah, which does not mean that the Holy Prophet is actually witnessing the acts of every person.

(Tafheemul-Quran, http://www.tafheem.net/main.html )