يَٰٓأَيُّهَا ٱلَّذِينَ ءَامَنُوا۟ ٱذْكُرُوا۟ نِعْمَتَ ٱللَّهِ عَلَيْكُمْ إِذْ هَمَّ قَوْمٌ أَن يَبْسُطُوٓا۟ إِلَيْكُمْ أَيْدِيَهُمْ فَكَفَّ أَيْدِيَهُمْ عَنكُمْ ۖ وَٱتَّقُوا۟ ٱللَّهَ ۚ وَعَلَى ٱللَّهِ فَلْيَتَوَكَّلِ ٱلْمُؤْمِنُونَ
O you who have believed, remember the favor of Allah upon you when a people determined to extend their hands [in aggression] against you, but He withheld their hands from you; and fear Allah. And upon Allah let the believers rely.
And remember Allah's favor to you and His covenant with which He bound you when you said: "We hear and we obey." And have Taqwa of Allah. Verily, Allah is All-Knower of that which is in the breasts (7)O you who believe! Stand out firmly for Allah as just witnesses; and let not the enmity and hatred of others make you avoid justice. Be just, that is nearer to Taqwa; and have Taqwa of Allah. Verily, Allah is Well-Acquainted with what you do (8)Allah has promised those who believe and do deeds of righteousness, that for them there is forgiveness and a great reward (i.e. Paradise)(9)And they who disbelieve and deny Our Ayat are those who will be the dwellers of the Hell-fire (10)O you who believe! Remember the favor of Allah unto you when some people desired (made a plan) to stretch out their hands against you, but (Allah) held back their hands from you. So have Taqwa of Allah. And in Allah let the believers put their trust (11)
Reminding the Believers of the Bounty of the Message and Islam
Allah reminds His believing servants of His bounty by legislating this glorious religion and sending them this honorable Messenger. He also reminds them of the covenant and pledges that He took from them to follow the Messenger ﷺ, support and aid him, implement his Law and convey it on his behalf, while accepting it themselves. Allah said,
وَاذْكُرُوا نِعْمَةَ اللَّهِ عَلَيْكُمْ وَمِيثَاقَهُ الَّذِي وَاثَقَكُم بِهِ إِذْ قُلْتُمْ سَمِعْنَا وَأَطَعْنَا
(And remember Allah's favor upon you and His covenant with which He bound you when you said, "We hear and we obey.")
This is the pledge that they used to give to the Messenger of Allah ﷺ when they embraced Islam. They used to say, "We gave our pledge of obedience to the Messenger of Allah ﷺ to hear and obey, in times when we are active and otherwise, even if we were passed on for rights, and not to dispute leadership with its rightful people." Allah also said,
وَمَا لَكُمْ لَا تُؤْمِنُونَ بِاللَّهِ وَالرَّسُولُ يَدْعُوكُمْ لِتُؤْمِنُوا بِرَبِّكُمْ وَقَدْ أَخَذَ مِيثَاقَكُمْ إِن كُنتُم مُّؤْمِنِينَ
(And what is the matter with you that you believe not in Allah! While the Messenger invites you to believe in your Lord; and He has indeed taken your covenant, if you are real believers.)[57:8]
It was also said that this Ayah (5:7) reminds the Jews of the pledges and promises Allah took from them to follow Muhammad ﷺ and adhere to his Law, as 'Ali bin Abi Talhah reported that Ibn 'Abbas stated. Allah then said,
وَاتَّقُوا اللَّهَ
(And have Taqwa of Allah.) in all times and situations. Allah says that He knows the secrets and thoughts that the hearts conceal,
إِنَّ اللَّهَ عَلِيمٌ بِذَاتِ الصُّدُورِ
(Verily, Allah is All-Knower of the secrets of (your) breasts.)
The Necessity of Observing Justice
Allah said,
يَا أَيُّهَا الَّذِينَ آمَنُوا كُونُوا قَوَّامِينَ لِلَّهِ
(O you who believe! Stand out firmly for Allah...) meaning, in truth for the sake of Allah, not for the sake of people or for fame,
شُهَدَاءَ بِالْقِسْطِ
(as just witnesses) observing justice and not transgression. It is recorded in the Two Sahihs that An-Nu'man bin Bashir said, "My father gave me a gift, but 'Amrah bint Rawahah, my mother, …