Prophet will be a Witness Against or For His Ummah
Allah subhanahu wa ta’ala said,
“So how (will it be) when We bring from each nation a witness and We bring you (O Muhammad) as a witness against these people”
Allah describes the horrors, hardships and difficulties of the Day of Resurrection, saying, how would it be on that Day when there will be a witness from every nation, meaning the Prophets, just as Allah said in Surah az-Zumar ayah 69,
وَأَشْرَقَتِ الاٌّرْضُ بِنُورِ رَبِّهَا وَوُضِعَ الْكِتَـبُ وَجِـىءَ بِالنَّبِيِّيْنَ وَالشُّهَدَآءِ
“And the earth will shine with the light of its Lord, and the Book will be placed (open); and the Prophets and the witnesses will be brought forward”,
and in Surah an-Nahl ayah 89,
وَيَوْمَ نَبْعَثُ فِى كُلِّ أُمَّةٍ شَهِيدًا عَلَيْهِمْ مِّنْ أَنفُسِهِمْ
“And (remember) the Day when We shall raise up from every nation a witness against them from amongst themselves.”
Bukhari recorded that Abdullah bin Masud said, “The Messenger of Allah sallAllahu aalyhi wa sallam said to me, `Recite to me.’ I said, `O Messenger of Allah! Should I recite (the Qur’an) to you, while it was revealed to you?’ He said, `Yes, for I like to hear it from other people.’ I recited Surah An-Nisa until I reached this Ayah,
He then said, `Stop now.’ I found that his eyes were tearful.”
Allah subhanahu wa ta’ala then says in ayah 42,
يَوْمَئِذٍ يَوَدُّ الَّذِينَ كَفَرُواْ وَعَصَوُاْ الرَّسُولَ لَوْ تُسَوَّى بِهِمُ الاٌّرْضُ وَلاَ يَكْتُمُونَ اللَّهَ حَدِيثاً
“On that day those who disbelieved and disobeyed the Messenger will wish that the earth was leveled with them. But they will not (be able) to hide any statement from Allah.”
This means they will wish that the earth would open up and swallow them because of the horror of the gathering place and the disgrace, dishonor and humiliation they will suffer on that Day.
indicates that they will admit to everything they did and will not hide any of it.